Skip to content
On this page

Getting Started

Prerequisites

  • Node.js version 16 or higher.

  • A base knowledge of Nx

Install Nx build worksapce

sh
$ npm create nx-workspace
sh
$ pnpm create nx-workspace
sh
$ yarn create nx-workspace

Once you create the workspace, you can use the command as flowlling to do what you want to:

WARNING

Nx 15 and lower use @nrwl/ instead of @nx/
  • generate an angular application which named web
sh
# yarn add @nx/angular -D -W
yarn add @nrwl/angular -D -W
sh
# npx nx g @nx/angular:app web
npx nx g @nrwl/angular:app web
  • generate an angular lib
sh
# npx nx g @nx/angular:lib common-web
npx nx g @nrwl/angular:lib common-web
  • Remove a library or an application by @nx/workspace
sh
# npx nx g @nx/workspace:remove common-web
npx nx g @nrwl/workspace:remove common-web

TIP

Sometimes you want to search a plugin's parameters, you can using command as flowing:

sh
# npx nx g @nx/angular:application –help
npx nx g @nrwl/angular:application –help

sh
# npx nx g @nx/workspace:remove –help
npx nx g @nrwl/workspace:remove –help