comment-header
v0.0.0
Published
A blank schematics
Readme
Getting Started With Schematics
This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
Testing
To test locally, install @angular-devkit/schematics-cli globally and use the schematics command line tool. That tool acts the same as the generate command of the Angular CLI, but also has a debug mode.
Check the documentation with
schematics --helpUnit Testing
npm run test will run the unit tests, using Jasmine as a runner and test framework.
Publishing
To publish, simply do:
npm run build
npm publishThat's it!
===================== node version definida pelo nvs 14.21.3 npm install -g @angular-devkit/[email protected]
atividades feitas no primeiro commit ("initial commmit"):
- node 14.21.3 setado, onde ja tem instalado globalmente o angular CLI 12.2.4
- instalacao do angular-devkit/schematics versao 12.2.4 sugerida pelo Curspor IA baseado na versao de node e angular usada e na versao mais estavel disponivel.
- Criacao do schematics blank --name=comment-header (no Medium usado como referencia o nome e myComponent)
- Edicao da Rule commentHeader para criar um arquivo com nome definido na linha de comando
- build com cmd "npm run build"
atividades feitas no segundo commit
Execucao de comando "schematics .:comment-header --name=test" na pasta "comment-header"
Executar npm link na pasta raiz do shematics
Testado em projeto novo, rodando no mesmo node do nvs em que o schematics foi criado, primeiro testar se o npm link funcionou rodando:
npm list -g --depth=0 --link=true
Se o schematics estiver listado, instalar no projeto novo
npm install --save-dev "G:\Angular Schematics\comment-header"Testar funcionalidade rodando
ng generate comment-header:comment-header --name nome-do-componente