generator-nyssa-fe

1.0.5 • Public • Published

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 is ReactTest.

Component

To generate a new component:

yo nyssa-fe:component
Prompts:
  • name Name for the generated component. The default value is MyComponent. 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 is misc.
  • container Flag to determine if the generated component should be a redux container. Default value is false.

Action

To generate a new action:

yo nyssa-fe:action
Prompts:
  • name Name for the generated action. The default value is MyAction.
  • 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 is actions.

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 is MyReducer.
  • path Path to the folder where the reducer should be stored. The file will use the name and the reducer suffix. Default value is reducers.

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 is MyEpic.
  • path Path to the folder where the epic should be stored. The file will use the name and the epic suffix. Default value is epics.

Form

To generate a new Form:

yo nyssa-fe:Form
Prompts:
  • name Name for the generated Form. The default value is MyForm.
  • module Name of the parent module for the form. Default value is misc.

Readme

Keywords

Package Sidebar

Install

npm i generator-nyssa-fe

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • gmmendezp