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-library
This 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:ngrxState
You 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.ts
stateName.effects.ts
stateName.model.ts
stateName.reducer.ts
stateName.selectors.ts
stateName.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:baseModule
You 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.gitkeep
file)entities/
(with a.gitkeep
file)enums/
(with a.gitkeep
file)models/
(with a.gitkeep
file)pipes/
(with a.gitkeep
file)resolvers/
(with a.gitkeep
file)services/
(with a.gitkeep
file)utils/
(with a.gitkeep
file)
- Two files:
moduleName.module.ts
moduleName.routing.ts
Example
If you run:
ng generate vgt-library:baseModule --moduleName=TestModule --path=src/app/modules
It will generate:
src/app/modules/test-module/
components/
entities/
enums/
models/
pipes/
resolvers/
services/
utils/
test-module.module.ts
test-module.routing.ts
License
This library is licensed under the MIT License. See the LICENSE file for more details.
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
2 years ago
2 years ago
2 years 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