Leosvel Pérez Espinosa 678818a58b
feat(angular): upgrade Angular to v12.0.0-rc.3 (#5630)
* feat(angular): upgrade Angular to v12.0.0-rc.3

* feat(angular): target Nx v12.4.0-beta.0 for Angular v12.0.0-rc.0 upgrade

* fix(angular): use defaultConfiguration if no other configuration is passed

* cleanup(angular): sync migration folder name to target version

* fix(repo): creating custom schema flattener for docs

* chore(repo): amend yarn.lock

* feat(angular): update angular storybook to use webpack 5

* fix(angular): add legacy peer deps for angular+jest

* fix(angular): move migrations to 12.3.0-rc.0

Co-authored-by: Zack DeRose <zack.derose@gmail.com>
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2021-05-12 12:20:12 -04:00

176 lines
2.3 KiB
Markdown

# library
Create an Angular library
## Usage
```bash
nx generate library ...
```
```bash
nx g lib ... # same
```
By default, Nx will search for `library` in the default collection provisioned in `workspace.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/angular:library ...
```
Show what will be generated without writing to disk:
```bash
nx g library ... --dry-run
```
## Options
### addModuleSpec
Default: `false`
Type: `boolean`
Add a module spec file.
### buildable
Default: `false`
Type: `boolean`
Generate a buildable library.
### directory
Type: `string`
A directory where the lib is placed
### enableIvy
Default: `false`
Type: `boolean`
Enable Ivy for library in tsconfig.lib.prod.json. Should not be used with publishable libraries.
### importPath
Type: `string`
The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.
### lazy
Default: `false`
Type: `boolean`
Add RouterModule.forChild when set to true, and a simple array of routes when set to false.
### linter
Default: `eslint`
Type: `string`
Possible values: `eslint`, `none`
The tool to use for running lint checks.
### name
Type: `string`
Library name
### parentModule
Type: `string`
Update the router configuration of the parent module using loadChildren or children, depending on what `lazy` is set to.
### prefix
Alias(es): p
Type: `string`
The prefix to apply to generated selectors.
### publishable
Default: `false`
Type: `boolean`
Generate a publishable library.
### routing
Default: `false`
Type: `boolean`
Add router configuration. See lazy for more information.
### simpleModuleName
Default: `false`
Type: `boolean`
Keep the module name simple (when using --directory)
### skipFormat
Default: `false`
Type: `boolean`
Skip formatting files
### skipPackageJson
Default: `false`
Type: `boolean`
Do not add dependencies to package.json.
### skipTsConfig
Default: `false`
Type: `boolean`
Do not update tsconfig.json for development experience.
### strict
Default: `false`
Type: `boolean`
Creates a library with stricter type checking and build optimization options.
### tags
Type: `string`
Add tags to the library (used for linting)
### unitTestRunner
Default: `jest`
Type: `string`
Possible values: `karma`, `jest`, `none`
Test runner to use for unit tests