@capiter-tech/portal-schematics
v1.0.1
Published
Collection for capiter portal schematics.
Keywords
Readme
@capiter-tech/portal-schematics
This package contains a collection of angular schematics developed for the internal Capiter portal.
@capiter-tech/portal-schematics extends the official @schematics/angular by default. so that you can call the schematics available in this collection the same way you call the official angular schematics, check the usage section for more info.
Installation
Install portal-schematics
npm i --save-dev @capiter-tech/portal-schematicsAliases (Optional)
set @capiter-tech/portal-schematics as the default collection. Update your project's
angular.json:"cli": { "defaultCollection": "@capiter-tech/portal-schematics" }provide default options, in the same way they are supplied for @angular/schematics:
"schematics": { "@schematics/angular:component": { "style": "scss" }, "@portal-schematics:component": { "style": "scss" } },
Ready?
Usage
if you followed step 2 in installation section then you can start using the schematics available in this collection the same way you use the offical Angular schematics
ng g <schematic-name> <inputs>Example:
ng g listing-with-filter vendor-returnsif you didn't follow step 2 then you need to call the schematic this way
ng g @capiter-tech/portal-schematics:<schematic-name> <inputs>Example:
ng g @capiter-tech/portal-schematics:listing-with-filter vendor-returnsSchematics
Listing with filter
this schematic creates a listing component and a child filter component inside the module this schematic is executed in or by passing the path of the module you would like to create those components in.
Inputs
| key | description | | ---- | -------------------------------------------------------- | | name | name of the feature or the listing view you are building |
Usage
CD into the module then call ng g with the schematic name
cd src/app/components/picking ng g listing-with-filter productsor call it using the alias
cd src/app/components/picking ng g lf products
