bronifty / lib-monorepo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PNPM monorepo with Nx; may look at swapping nx out with vanilla node 22 cache and monorepo support; but i also want to use nx for zach's project which incorporates it, so there's that. anyway, maybe why not both situation


Nx Usage Notes
  • whereas with pnpm you filter the command for the project, with nx you run the command and specify the project
 npx nx <target> <project>

target is the NPM script in this specific case you want to execute.

Sample Nx Commands

  • dev is the package.json script in the web project
npx nx dev web
npx nx test @bronifty/marcs-observable
  • run commands in parallel
npx nx run-many --target=build --all
npx nx run-many --target=build --projects=@bronifty/marcs-observable,web

Note I’m prefixing the commands with npx which runs the Nx executable in the node_modules folder. In this way I don't have to install nx globally. If you prefer doing that, feel free to do so.

References

About


Languages

Language:Shell 50.8%Language:TypeScript 32.9%Language:JavaScript 10.7%Language:Makefile 2.8%Language:CSS 2.3%Language:HTML 0.5%