vgt-library v0.5.1
VGT Platform Library
A library for use with Angular CLI to streamline development within the VGT platform.
Installation
To install the library, run:
yarn add vgt-libraryThis should be done only once when setting up a new Angular project for VGT.
Creating an NGRX State
To generate an NGRX state, use the following command:
ng generate vgt-library:ngrxStateYou will be prompted to provide two inputs:
- Name of the state: This will also create a model with the same name.
- Path: The location where the state files will be generated (e.g.,
src/app/shared/entity-data).
This command creates six files:
stateName.actions.tsstateName.effects.tsstateName.model.tsstateName.reducer.tsstateName.selectors.tsstateName.service.ts
Creating a Base Angular Module Structure
To generate a base Angular module structure for your project, use the following command:
ng generate vgt-library:baseModuleYou will be prompted to provide two inputs:
- Module Name: The name of the module to be created.
- Path: The location where the module should be created (e.g.,
src/app).
This command will create the following structure:
- A folder with the module name.
- Inside the module folder:
components/(with a.gitkeepfile)entities/(with a.gitkeepfile)enums/(with a.gitkeepfile)models/(with a.gitkeepfile)pipes/(with a.gitkeepfile)resolvers/(with a.gitkeepfile)services/(with a.gitkeepfile)utils/(with a.gitkeepfile)
- Two files:
moduleName.module.tsmoduleName.routing.ts
Example
If you run:
ng generate vgt-library:baseModule --moduleName=TestModule --path=src/app/modulesIt will generate:
src/app/modules/test-module/components/entities/enums/models/pipes/resolvers/services/utils/test-module.module.tstest-module.routing.ts
License
This library is licensed under the MIT License. See the LICENSE file for more details.
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago