dian-schematics
v1.0.13
Published
A blank schematics
Downloads
37
Readme
DianSchematics
Esta librería contiene los schematics para adicionar la configuración inicial de los proyectos, generación de artefactos usando Clean Architecture, generación y configuración de Workers y generación de funciones aisladas usando Angular 17+.
Version
|VERSION |DESCRIPCIÓN |
|----------------|------------------------------------|
|1.0.0|Versión inicial contiene los schematics para generar la configuración inicial, funciones aisladas, generación de workers y creación de plantillas usando clean architecture
|
|1.0.1|Se corrige generación de archivo eslint.config.js
|
|1.0.2|Se corrige confirmación de dependencias de instalación
|
|1.0.3|Se corrigen templates de acuerdo a configuraciones de eslint
|
Install
npm i dian-schematics --save-dev
Schematics list
|SCHEMATIC |DESCRIPCIÓN |
|---------------|------------------------------------|
|dian-init
|Agrega la configuración inicial al proyecto, instalando las depedencias necesarias como eslint y prettier
|
|dian-caflow
|Genera los archivos y carpetas para un componente siguiendo la estructura de Clean Architecture
|
|dian-if
|Genera los archivos y directorios para crear funciones aisladas
|
|dian-w
|Genera los archivos y directorios para configurar un worker en el proyecto
|
Use
Para usar un schematic siga la siguiente estructura:
ng g dian-schematics:[schematic]
Ejemplo: ng g dian-schematics:dian-init
Getting Started With Schematics
Welcome to the Schematic Project DIAN! This project is a collection of schematics designed to automate and streamline your development process.
Installation
To get started, you'll need to install the Schematics CLI and Project Builder CLI. You can do this via npm:
npm i -g @pbuilder/cli
npm install -g @angular-devkit/schematics-cli @pbuilder/cli
Creating a Schematic
To create a new schematic library project, run:
builder new dian-schematics [autor]
Show list schematic of package
To show list schematic of angular
builder info @schematics/angular //Show list shematic
builder info @schematics/angular [name_schematic] //Show specific shematic
Generate a schematic
builder g @pbuilder/sm sc --name="my-schematic"
This command will set up the project structure for your schematics.
Executing Schematics
Testing Locally
Using PBuilder CLI
Is necessary compile first
npm run build
After execute
builder exec ./dist/collection.json [name_schematic]
Using Schematics CLI
To test your schematics locally using the Schematics CLI, run:
schematics [dist-collection-path]:[schematic-name] [options]
Using Verdaccio
Verdaccio is a lightweight private npm proxy registry that you can use to publish and test your schematics locally. Make sure you have Verdaccio installed and running. To publish your schematic to Verdaccio, add the following npm script to your package.json:
"scripts": {
"publish:verdaccio": "npm publish --registry http://localhost:4873"
}
To publish and test your schematic:
- Start Verdaccio:
npx verdaccio
- Publish your schematic to Verdaccio:
npm run publish:verdaccio
- Install and execute your schematic from Verdaccio:
npm install my-schematic --registry http://localhost:4873
schematics my-schematic:my-rule
Documentation
For more detailed instructions and options, visit the (Schematics Documentation)[https://schematics.pbuilder.dev/installation/].
Contributing
We welcome contributions! Please read our (Contributing)[/CONTRIBUTING.md] Guidelines for details on our code of conduct and the process for submitting pull requests.