NX commands
A subset of nx cli commands
Global Options:
--dry-run
--buildable # options for libs. alias is: publishable
--tags=
domain: <shared>
type: <app/util/ui/feature/domain-logic/shell>
platform: <web/mobile/desktop/node/universal>Generate Commands
Generate Modules
yarn create nx-workspace yeti --preset=empty -prefix=yeti # create an empty workspace
nx g @nrwl/angular:app yeti-web-app --style=scss --prefix=yeti --routing --tags="domain:yeti,type:app,platform:web" --dry-run
nx g @nrwl/nest:app yeti-api --frontendProject=yeti-web-app --tags="domain:yeti,type:api,platform:node"
# generate share angular lib module
nx g @nrwl/angular:lib ui --style=scss --tags="domain:shared,type:ui,platform:web"
nx g @nrwl/angular:lib knob --directory=components --buildable --style=scss --tags="domain:shared,type:ui,platform:web"
nx g @nrwl/nest:lib <nest-lib> [--controller] [--service] [--global] [--buildable] [--tags] # generate nestjs lib module
nx g @nrwl/workspace:lib btree --directory=utils --tags="domain:shared,type:util,platform:universal" # generate share universal lib moduleRefactor Modules
Generate Components
Generate workspace schematics
Run commands
For Single Project
For Multiple Projects
For Affected Projects
Other Commands
Reference
Last updated
Was this helpful?