NGXS Schematic
NGXS Schematic makes it easy to create a state files.
NGXS Schematic create a tree
├── states/
│ ├── <your-state-name>.state.ts/
│ ├── index.ts/
├── actions/
│ ├── <your-state-name>.actions.ts/
│ ├── index.ts/
├── models/
│ ├── <your-state-name>.ts/
│ ├── index.ts/
Installation
Run the following code in your terminal:
npm install ngxs-schematic --save-dev
yarn add ngxs-schematic --dev
Usage
yarn ng generate ngxs-schematic:state <your-state-name> <your-path> --project <your-project-name> --module <your-module-path> --forRoot <true|false> --skipImport <true|false>
Properties:
"name": {
"type": "string",
"$default": {
"$source": "argv",
"index": 0
}
},
"path": {
"type": "string",
"$default": {
"$source": "argv",
"index": 1
}
},
"project": {
"type": "string"
},
"module": {
"type": "string"
},
"forRoot": {
"type": "boolean"
},
"skipImport": {
"type": "boolean",
"default": false
}
Do you need help?
yarn ng g ngxs-schematic:state --help