A command line component generator with a React, Jest, Styled-components and storybook template component.
sudo npm install react-create-component -g
- clone the project
git clone https://github.com/andre-araujo/react-create-component.git
- navigate to project folder
cd /react-create-component
- use npm link
npm link
-
Generate component into current directory
-
react-create-component ComponentName
-
Generate component into subdirectory
-
react-create-component ComponentName ./existing-folder-path
/ComponentName
/ComponentName.js
/ComponentName.spec.js
/ComponentName.stories.js
/styles.js
/index.js