hubtel-angular v0.0.7
Getting Started with Hubtel Angular Schematics
This Schematic is a code generation tool designed to improve productivity and consistency while developing Angular applications at Hubtel.
Installation
Install the schematics-cli globally by running the following command:
$ npm install -g @angular-devkit/schematics-cli
Install the hubtel-angular package by running the following command:
$ npm install hubtel-angular
Scaffolding an Angular App
To scaffold a new Angular app, run the following command:
$ schematics hubtel-angular:app
If the node modules fail to install automatically after scaffolding an app due to peer dependencies conflict, change the directory to your project directory using the command
cd <project directory>
and run npm i --force
to install the dependencies manually.
then, select the template you wish to use. Available templates include "blank" and "full".
Generating Components
To generate a new component, run the following command:
$ ng g hubtel-angular:c
.
You will then be prompted to enter the name of the component.
Generating Pipes
To generate a new pipe, run the following command:
$ ng g hubtel-angular:p
.
You will then be prompted to select the pipe you wish to generate. Available options include "Event Reporter", "Loading Interceptor", "Request Interceptor", and "Response Interceptor".
Generating Middleware
To generate a new middleware, run the following command:
$ ng g hubtel-angular:mw
.
You will then be prompted to select the middleware you wish to generate. Available options include "Capitalize", "Escape HTML", "Limit", and "Truncate".
Adding Artifacts
To add a set of artifacts to your project, run the following command:
$ ng g hubtel-angular:a
.
and user the spacebar to select one or more of the available artifats "Middleware", "Pipes", "Directives", "Services", and "Dynamic Forms".
Adding Dynamic Forms
To add a dynamic form module to your project, run the following command:
$ ng g hubtel-angular:f
.