0.5.1 • Published 1 year ago

vgt-library v0.5.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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:

  1. Name of the state: This will also create a model with the same name.
  2. 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:

  1. Module Name: The name of the module to be created.
  2. 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.

0.4.9

1 year ago

0.4.8

1 year ago

0.3.0

1 year ago

0.4.5

1 year ago

0.3.6

1 year ago

0.4.4

1 year ago

0.3.5

1 year ago

0.4.7

1 year ago

0.3.8

1 year ago

0.4.6

1 year ago

0.3.7

1 year ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.4.3

1 year ago

0.3.4

1 year ago

0.5.1

1 year ago

0.4.2

1 year ago

0.3.3

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.5

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago