0.0.4 • Published 6 years ago

adneom-ngx-factory v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

use Adneom Ngx Factory with @angular/cli

  • create a new angular project
npm i @angular/cli -g
ng new <my-project> --styles=scss
cd <my-project>
  • 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 -g

copy 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 build

symlink for adneom collection

From root: npm link adneom-collection# 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 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 --help

Unit 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 publish

That's it!