A collection of commands to help with running NX in the monorepo.
Use the pnpm nx
command to use the monorepo's NX package, or install NX
globally on your machine with npm. Project names are based on the name defined
in the workspace's project.json
, not the directory name.
pnpm nx <target> <project>
# examples
# pnpm nx deploy contracts
# pnpm nx serve auth-server
# pnpm nx build sdk
NX commands can be run in parallel across all the packages with the run-many
command.
pnpm nx run-many --target=build --all
Finetune to specific projects:
pnpm nx run-many -t serve -p demo-app auth-server
This provides a UI to see what commands are available for a project. This is
usually the scripts you'll see in the package.json
but this will make it
easier to see if NX is modifying a particular command based on a plugin.
To see the available commands for a project with NX:
pnpm nx show project <project> --web
Run the pnpm nx report
command to get the list of NX packages and plugins with
their versions. It will report whether any packages need to be updated.