npm-workspaces-example

NPM workspaces example for monorepos

Stars
5

NPM workspaces example

Must have npm version 7.

Install

npm install

Running scripts

Running a script named "dev" in all workspaces located under apps/backend:

npm run dev -w apps/backend

Running a script named "dev" in all workspaces:

npm run dev --ws

Running a script named "dev" in a package named package-a

npm run dev -w package-a

Observations

npm run build --ws doesn't build packages in the correct order... For example app with dep package-a will build before package-a

Alt approaches