@nrwl/nest:library
Create a NestJS Library for Nx.
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/nest:library ...Show what will be generated without writing to disk:
nx g library ... --dry-runExamples
Generate libs/myapp/mylib:
nx g lib mylib --directory=myappOptions
buildable
falseGenerate a buildable library.
controller
falseInclude a controller with the library.
directory
A directory where the library is placed.
global
falseAdd the Global decorator to the generated module.
importPath
The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.
linter
eslinteslint, noneThe tool to use for running lint checks.
name
Library name.
publishable
Create a publishable library.
skipFormat
falseSkip formatting files.
skipTsConfig
falseDo not update tsconfig.base.json for development experience.
service
falseInclude a service with the library.
strict
falseWhether to enable tsconfig strict mode or not.
standaloneConfig
trueSplit 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.
tags
Add tags to the library (used for linting).
testEnvironment
nodejsdom, nodeThe test environment for jest, for node applications this should stay as node unless doing DOM testing.
target
es6es5, es6, esnext, es2015, es2016, es2017, es2018, es2019, es2020The ES target, Nest suggest using es6 or higher.
unitTestRunner
jestjest, noneTest runner to use for unit tests.