generator-nyssa-fe
v1.0.5
Published
Front End yeoman generator for nyssa
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-feTemplates
Project
To generate a new project:
yo nyssa-fePrompts:
nameName for the generated project. The default value isReactTest.
Component
To generate a new component:
yo nyssa-fe:componentPrompts:
nameName for the generated component. The default value isMyComponent. If the name has slashes it will use it as the whole path for the component.moduleName of the parent module for the component. Default value ismisc.containerFlag to determine if the generated component should be a redux container. Default value isfalse.
Action
To generate a new action:
yo nyssa-fe:actionPrompts:
nameName for the generated action. The default value isMyAction.pathPath 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:reducerPrompts:
nameName 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.pathPath to the folder where the reducer should be stored. The file will use the name and thereducersuffix. Default value isreducers.
Epic (redux-observable)
To generate a new epic:
yo nyssa-fe:epicPrompts:
nameName for the generated epic, to use in the combine epic file. Default value isMyEpic.pathPath to the folder where the epic should be stored. The file will use the name and theepicsuffix. Default value isepics.
Form
To generate a new Form:
yo nyssa-fe:FormPrompts:
nameName for the generated Form. The default value isMyForm.moduleName of the parent module for the form. Default value ismisc.
