Skip to content

snaerth/create-react-component-folder

 
 

Repository files navigation

About

Creates react component folder structure with one command. We also support Typescript. You can either use crcf or create-react-component-folder Read the artice on Medium

Tutorial

Read the artice on Medium

Install

npm install -g create-react-component-folder

Creating single component

$ crcf myComponent
$ crcf nested/myComponent

Output single

Creating multiple components

$ crcf components/header footer button navigation

Output multiple

Component folder structure

myComponent
├── index.js
├── myComponent.js
├── myComponent.css
├── myComponent.test.js

Options

$ crcf --help

Options
--------------
    -V, --version    output the version number
    --typescript     Creates Typescript component and files
    --reactnative    Creates React Native component and files
    --nocss          No css file
    --notest         No test file
    --createindex    Create index.js file in root of folder with imports of all components in folder       -l, --less       Adds .less file to component
    -s, --sass       Adds .sass file to component
    -p, --proptypes  Adds prop-types to component
    -u, --uppercase  Component files start on uppercase letter
    -h, --help       output usage information

Author

License

MIT

Releases

No releases published

Packages

No packages published

Contributors 19