简体   繁体   中英

@schematics/angular:library VS @nrwl/angular:library

I want to add a new feature module to my existing angular app through the use of Nx Console tool, but I have been confused which of the following should I use to do so:

ng generate @schematics/angular:library

or

ng generate @nrwl/angular:library

Basically, you can use both of them.

The @nrwl/angular:library schematic uses the @schematics/angular:library schematic under the hood and adds some functionality around it including generating publishable libraries , adding tags to the library or out of the box jest support for testing .

See all configuration options here:

Additionally, in an Nx workspace it makes sense to use the @nrwl schematic, because it follows the standard structure of nx workspaces by placing the libraries in the libs folder by default.

Note, that Nrwl uses the naming generators for schematics .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM