1.2.1 • Published 5 years ago
js-structure-builder v1.2.1
javascript-structure-builder
A CLI for create some javascript structure like components and config files.
Getting Started
General prerequisites
You only need npm to globally install this cli.
Installing
Get the package from NPM:
npm install -g js-structure-builderor with yarn:
yarn global add js-structure-builderUsing
Creating react component
Using the generate:rc command a react functional component will be created in src/components.
jsb generate:rc componentNameOr with the alias:
jsb grc componentNameCreating react page
Using the generate:rp command a react functional component will be created in src/pages.
jsb generate:rp pageNameOr with the alias:
jsb grp pageNameCreating a redux config file
The redux:config command will create a config file for redux in src/store/index.js.
jsb redux:configOr with the alias:
jsb rxc Creating a reducer
The redux config file use a rootReducers to get all the reducers in the src/store/reducers directory, using the redux:reducer a reducer will be created.
jsb redux:reducer reducerNameOr with the alias:
jsb rxr reducerName