A schematics
npm install adneom-ngx-factory
npm i @angular/cli -g
ng new --styles=scss
cd
`
* add ngx factory as dependency: npm i adneom-ngx-factory --save-dev
* generate core: ng g core --collection=adneom-ngx-factory
* => you should see some _remove, create, update_ jobs in your new app
* run tests: npm test
* => you should see every tests passing, including _AppComponent, CoreModule, ApiService_create my own schematics
Install needed global packages: npm i @angular-devkit/schematics @schematics/schematics @schematics/angular typescript jasmine rxjs -gcopy an example schematics
Then from root, copy an example module: cp -R ./devkit/packages/schematics/angular/module ./adneom-collection/src/my-adneom-module
replace ../ by '@schematics/angular/ everywhere in copied files
Then: cd adneom-collection && ng buildsymlink for adneom collection
From root: npm link adneom-collection# Getting Started With SchematicsThis repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
$3
To test locally, install
@angular-devkit/schematics 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
`bash
schematics --help
`$3
npm run test will run the unit tests, using Jasmine as a runner and test framework.$3
To publish, simply do:
`bash
npm run build
npm publish
``That's it!