@nrwl/angular:library
Creates an Angular library.
Usage
nx generate library ...nx g lib ... #sameBy default, Nx will search for library in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
nx g @nrwl/angular:library ...Show what will be generated without writing to disk:
nx g library ... --dry-runOptions
addModuleSpec
falseAdd a module spec file.
addTailwind
falseWhether to configure Tailwind CSS for the application. It can only be used with buildable and publishable libraries. Non-buildable libraries will use the application's Tailwind configuration.
buildable
falseGenerate a buildable library.
compilationMode
full, partialSpecifies the compilation mode to use. If not specified, it will default to partial for publishable libraries and to full for buildable libraries. The full value can not be used for publishable libraries.
directory
A directory where the library is placed.
importPath
The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.
lazy
falseAdd RouterModule.forChild when set to true, and a simple array of routes when set to false.
linter
eslinteslint, noneThe tool to use for running lint checks.
name
^[a-zA-Z].*$The name of the library.
publishable
falseGenerate a publishable library.
prefix
html-selectorThe prefix to apply to generated selectors.
parentModule
Update the router configuration of the parent module using loadChildren or children, depending on what lazy is set to.
routing
falseAdd router configuration. See lazy for more information.
skipFormat
falseSkip formatting files.
simpleModuleName
falseKeep the module name simple (when using --directory).
skipPackageJson
falseDo not add dependencies to package.json.
skipPostInstall
falseDo not add or append ngcc to the postinstall script in package.json.
skipTsConfig
falseDo not update tsconfig.json for development experience.
strict
trueCreate a library with stricter type checking and build optimization options.
standaloneConfig
Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.
setParserOptionsProject
falseWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.
skipModule
falseWhether to skip the creation of a default module when generating the library.
tags
Add tags to the library (used for linting).
unitTestRunner
jestkarma, jest, noneTest runner to use for unit tests.