tiny-react-cli
v1.0.1
Published
React command line interface for component generation
Downloads
3
Maintainers
Readme
What is the purpose?
It's a very tiny cli (command line interface) tool for creating react component.
Usage
Install package
# NPM
npm install tiny-react-cli
# Yarn
yarn add tiny-react-cli
Create with default settings
** Command **
react-cli g ComponentName
** Result **
Welcome to tiny react cli
CREATED: src/components/ComponentName/index.js
CREATED: src/components/ComponentName/ComponentName.js
Options
add test file to output with "-t" parameter
** Command **
react-cli g ComponentName -t
** Result **
Welcome to tiny react cli
CREATED: src/components/ComponentName/index.js
CREATED: src/components/ComponentName/ComponentName.js
CREATED: src/components/ComponentName/ComponentName.test.js
use custom path with "-p" parameter
** Command **
react-cli g ComponentName -t -p src/pages
** Result **
Welcome to tiny react cli
CREATED: src/pages/ComponentName/index.js
CREATED: src/pages/ComponentName/ComponentName.js
CREATED: src/pages/ComponentName/ComponentName.test.js
Licence
MIT