0.1.5 • Published 2 years ago

ui-lib-for-test v0.1.5

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

FirstSchematicsExample

This project was generated with Angular CLI version 13.2.5.

This repository has the objective of create simple angular schematics.

The Schematics available here are:

  • ng-add -> this Schematic runs when we had this "library" to an existing project through the ng add comand (ng add ui-lib-for-test) and it only adds a service from this "library" to the app.module.ts.
  • create-custom-component/ccc -> this schematic is used like (ng generate ui-lib-for-test:create-custom-component or ng generate ui-lib-for-test:ccc) the ccc is an alias that allow us to have a shortcut to invoke this schematic.
    • The objective of this schematic is to create a custom component that currently injects this component in the app.module.ts and creates the base files for a component (.ts, .html, .css, .spec.ts), and it currently populates only the .ts and .html files.
    • It can receive two parameters for now:
      • --name (ng generate ui-lib-for-test:ccc --name <customComponentName>), this will be the name of the files and the name of the component created, the final name will not be exactly the one choosed because it will be "dashrized" in order to have a file name that follows the rules of the other files created by angular.
      • There will also be an option to define where the component should be cretead, keep in mind that when changing the default path you have to write (src/app/<desired-path>) in order to place the new component where the components are used to be.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago