Run the below to create an application.
npx nx g @nx/angular:app main --directory=apps/medium/<app-name> --prefix=idc
Run the below to create an smart library.
npx nx g @nx/angular:lib smart --directory=libs/medium/<lib-name> --prefix=idc
Run the below to create an ui library.
npx nx g @nx/angular:lib ui --directory=libs/medium/<lib-name> --prefix=idc
Run the below to start the development server. Happy coding!
npx nx run medium-todo-main:serve
Run the below
npx nx run medium-todo-main:build
to build the application. The build artifacts are stored in the output directory (e.g. dist/
or build/
), ready to be deployed.
Run the below to run lint.
npx nx run medium-todo-main:lint
npx nx run medium-todo-smart:lint
npx nx run medium-todo-ui:lint
npx nx g @nx/angular:component counter --directory=libs/medium/counter/smart/src/lib/entry-components --prefix=idc
npx nx g @nx/angular:component counter-page --directory=libs/medium/counter/ui/src/lib/pages --prefix=idc
Run the below to run test cases.
npx nx run medium-todo-main:test
npx nx run medium-todo-smart:test
npx nx run medium-todo-ui:test
To execute tasks with Nx use the following syntax:
npx nx <target> <project> <...options>
You can also run multiple targets:
npx nx run-many -t <target1> <target2>
..or add -p
to filter specific projects
npx nx run-many -t <target1> <target2> -p <proj1> <proj2>
Targets can be defined in the package.json
or projects.json
. Learn more in the docs.
Nx comes with local caching already built-in (check your nx.json
). On CI you might want to go a step further.
Run npx nx graph
to show the graph of the workspace.
It will show tasks that you can run with Nx.
โจ This workspace has been generated by Nx, Smart Monorepos ยท Fast CI. โจ
Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.