generator-nyssa-fe
v1.0.5
Published
Front End yeoman generator for nyssa
Downloads
3
Readme
Nyssa FE Generator
This project uses create-react-app as base. With a few additions like Redux, redux-observable, react-router, typestyle, rimraf, standard and prettier.
NOTE: It also adds prettier as a precommit hook with lint-staged and husky.
Usage
First, install Yeoman and generator-nyssa-fe using npm (we assume you have pre-installed node.js).
npm install -g yo generator-nyssa-fe
Templates
Project
To generate a new project:
yo nyssa-fe
Prompts:
name
Name for the generated project. The default value isReactTest
.
Component
To generate a new component:
yo nyssa-fe:component
Prompts:
name
Name for the generated component. The default value isMyComponent
. If the name has slashes it will use it as the whole path for the component.module
Name of the parent module for the component. Default value ismisc
.container
Flag to determine if the generated component should be a redux container. Default value isfalse
.
Action
To generate a new action:
yo nyssa-fe:action
Prompts:
name
Name for the generated action. The default value isMyAction
.path
Path to the folder where the action should be stored. The file will take the name of the folder plus the actions suffix. If the file doesn't exist it will create it. Default value isactions
.
Reducer
To generate a new reducer:
yo nyssa-fe:reducer
Prompts:
name
Name for the generated reducer, to use in the combine reducers file. The default value will take the last section of the path. Default value isMyReducer
.path
Path to the folder where the reducer should be stored. The file will use the name and thereducer
suffix. Default value isreducers
.
Epic (redux-observable)
To generate a new epic:
yo nyssa-fe:epic
Prompts:
name
Name for the generated epic, to use in the combine epic file. Default value isMyEpic
.path
Path to the folder where the epic should be stored. The file will use the name and theepic
suffix. Default value isepics
.
Form
To generate a new Form:
yo nyssa-fe:Form
Prompts:
name
Name for the generated Form. The default value isMyForm
.module
Name of the parent module for the form. Default value ismisc
.