generate library
Command
ng generate library
ng generate lib
Creates a new, generic library project in the current workspace.
Arguments
name
The name of the library.
Value Type
string
Options
entry-file
The path at which to create the library's public API file, relative to the workspace root.
Value Type
string
Defaultpublic-api
prefix
Alias
p
A prefix to apply to generated selectors.
Value Type
string
Defaultlib
project-root
The root directory of the new library.
Value Type
string
skip-install
Do not install dependency packages.
Value Type
boolean
Defaultfalse
skip-package-json
Do not add dependencies to the "package.json" file.
Value Type
boolean
Defaultfalse
skip-ts-config
Do not update "tsconfig.json" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development.
Value Type
boolean
Defaultfalse
standalone
Creates a library based upon the standalone API, without NgModules.
Value Type
boolean
Defaulttrue
Jump to details