generate library
Command
ng generate libraryng generate libCreates a new, generic library project in the current workspace.
Arguments
nameThe name of the library.
Value Type
stringOptions
entry-fileThe path at which to create the library's public API file, relative to the workspace root.
Value Type
stringDefaultpublic-apiprefixAlias
p A prefix to apply to generated selectors.
Value Type
stringDefaultlibproject-rootThe root directory of the new library.
Value Type
stringskip-installDo not install dependency packages.
Value Type
booleanDefaultfalseskip-package-jsonDo not add dependencies to the "package.json" file.
Value Type
booleanDefaultfalseskip-ts-configDo 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
booleanDefaultfalsestandaloneCreates a library based upon the standalone API, without NgModules.
Value Type
booleanDefaulttrueJump to details