React-Create component app v1.7.0: Tool to generate different types of React components from the terminal. ?

icon
Latest Release: v1.7.0

create-component-app

How much time do you spend copying and pasting the component folder to create a new one ?
This is a tool to generate different types of React components from the terminal.


create-component-app

Install

$ npm install -g create-component-app

Usage

$ cd ~/my-projects
$ create-component-app

You can specify default values to save a lot of time

If you want, you can set default values from a JSON:

{   
    // Default type of component ["stateless", "class", "pure"]
    "type": "stateless", 

    // Default path to create component file and folder
    "path": "./src/components",

    // Default extension for your javascript file ["js", "jsx"]
    "jsExtension": "js",

    // Default extension for your css file ["css", "scss", "sass", "less"]
    "cssExtension": "css",

    // Default flag to create an index file in the folder [false, true]
    "indexFile": false,

    // Default flag to integrate connect redux in the index file [false, true]
    "connected": false,
}

and pass the path to config param

$ create-component-app --config path/to/your/config.json

Future

  • Template to test the component
  • Adds the ability to insert component life cycle methods
  • Get custom templates from user
  • A lot more options

Contributing

The library is open to everybody, contribute improve your skills.

create-component-app is maintained under the Semantic Versioning guidelines.

Use npm run watch while coding.

License

MIT © Christian Varisco

Comments