JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q58412F
  • License ISC

NgRx Store Generator

Package Exports

  • ngrx-store-builder
  • ngrx-store-builder/dist/controller/generate-store.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngrx-store-builder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NgRx Store Builder

This package aims to generate code for ngrx store.

Note: This package will only work with node version 11 and above.

Installation

Install ngrx-store-builder with npm

Local Installation

npm install ngrx-store-builder --save-dev
  • Add the following script to the package.json file
  "scripts": {
    "generate":"generate-ngrx-store"
  },
  • Then execute the following command to generate ngrx files
npm run generate

Global Installation

npm install ngrx-store-builder -g
  • Go to the directory where you want to generate ngrx files
  • Run the following command
generate-ngrx-store
  • You need to provide Model Name and Model Properties as CLI Inputs after you run the above command

Folder Structure Of NgRx Generated Store

store
| 
|___actions //actions folder
|   |   modelName.action.ts
|___effects //effects folder
|   |   modelName.effect.ts
|___models //model folder
|   |   modelName.model.ts
|___reducers //reducer folder
|   |   modelName.reducer.ts
|___services //service folder
|   |   modelName.service.ts
|___states //states folder
|    |   modelName.state.ts
|___selectors //selectors folder
|   |   modelName.selector.ts