1.0.3 • Published 6 years ago

reactjs-component-creator v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-

A CLI generator for Reactjs components

Install

$ npm install -g reactjs-component-creator

Usage

The most basic command runs a wizard to create a component.

$ rc

Note: Names can be inputted in any format (slug-case, camelCase, PascalCase etc.).

component

Directly create a component based on the current settings.

$ rc component <name>

Arguments:

  • name: The name you want to use for the component.

Options:

  • -d, --destination <destination>: Override the destination for component.
  • -p, --template-path <template-path>: Override template path.
  • -t, --template <template>: Override template type. By default it uses the 'component' folder from the template path. With this option you can use a different template folder.
  • -f, --force: Force creation of a component. By default it's impossible to create a component if the destination path doesn't exist. This option forces the creation of a component and will generates the destination folders if they don't exist.

Examples:

$ rc component check-box
$ rc component RadioButton -d ./components/ui
$ rc component videoPlayer -d ./src/components/players/ -t base-video-component -f

The generated file will be *