Create React Component folder
About
This package is built on top of create-react-component-folder.
It provides smoke tests along with normal test based on a flag.
Create React Component folder works on macOS, Windows, and Linux.
It creates React or React Native component folder structure with one command.
There is also support for Typescript, React Native, Less and Sass.
Quick Overview
$ npm install --save-dev create-react-component-folder$ npx crcf myComponent
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
Tutorial
Installation
$ npm install --save-dev create-react-component-folder
Creating single component
$ npx crcf myComponent$ npx crcf components/myComponent
Output single
Creating multiple components
$ npx crcf components/header footer button navigation
Output multiple
Component folder structure
myComponent├── index.js├── myComponent.js├── myComponent.css├── myComponent.test.js
Creating index.js file for multple component imports
$ npx crcf --createindex
Output in index.js file for multple component imports
Options
$ npx crcf --help Usage: index [options] Options: -V, --version output the version number --typescript Creates Typescript component and files --nocss No css file --notest No test file --reactnative Creates React Native components --createindex Creates index.js file
Author
License
MIT