@prodo/cli

1.1.10 • Public • Published

@prodo/cli

This command-line interface (CLI) lets you import components created with Prodo into your React project.

Installation

Install the CLI with npm or yarn:

npm install -g @prodo/cli

You can then run prodo. Try:

prodo help

Initialization

First, initialize Prodo in your project directory (where your package.json file is).

prodo init

This command

  • Creates an empty prodo.json file that lists the components your project uses.
  • Adds a postinstall script to your package.json file that will install all of your Prodo components after running npm install.
  • Adds @prodo/react as a dependency. This package contains the necessary React hooks and HOCs to make your components state and actions work.
  • Adds @prodo/cli as a dev dependency. This means the rest of your team can use the Prodo components you have added without needing to poke them to install the CLI.

Adding and Using Components

To add a Prodo component run (replacing MyComponent with the name of your component and username with your username):

prodo add username.ComponentName

The components can be used in your React project with:

import ComponentName from "@prodo/username.ComponentName";

and used with

<ComponentName />

The behavior you defined for your component will work out of the box!

Update a component to the latest version by running prodo add again.

Readme

Keywords

none

Package Sidebar

Install

npm i @prodo/cli

Weekly Downloads

0

Version

1.1.10

License

MIT

Unpacked Size

112 kB

Total Files

46

Last publish

Collaborators

  • andrejak
  • brunomarnette
  • jakerunzer
  • samirtalwar
  • tdawes