@nrwl/nest:library
Create a NestJS Library for Nx.
Create a NestJS Library for Nx.
nx generate library ...
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:
nx g @nrwl/nest:library ...
Show what will be generated without writing to disk:
nx g library ... --dry-run
Generate libs/myapp/mylib:
nx g lib mylib --directory=myapp
Library name.
falseGenerate a buildable library.
Create a publishable library.
falseInclude a controller with the library.
A directory where the library is placed.
falseAdd the Global decorator to the generated module.
The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.
eslinteslint, noneThe tool to use for running lint checks.
falseInclude a service with the library.
falseWhether to enable tsconfig strict mode or not.
falseWhether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.
Add tags to the library (used for linting).
nodejsdom, nodeThe test environment for jest, for node applications this should stay as node unless doing DOM testing.
es6es5, es6, esnext, es2015, es2016, es2017, es2018, es2019, es2020The ES target, Nest suggest using es6 or higher.
jestjest, noneTest runner to use for unit tests.
falseSkip formatting files.
falseDo not update tsconfig.base.json for development experience.
falseDo not add dependencies to package.json.
trueSplit the project configuration into <projectRoot>/project.json rather than including it inside workspace.json
Nx only supports standaloneConfig