1

We have an angular 11 project with more than 20 custom angular libraries created by us. When we need to run npm install we need to change directory to each library. Is there any way we can run npm install for all libraries without manually changing directory. Currently we are using a shell script to do the task.

enter image description here

I want to run npm install inside each of these projects. Ex: dev-about-page, dev-accept-invitation-page ... etc

  • 1
    you would probably want to migrate to a monorepo structure: https://nx.dev/ – 31piy Dec 08 '21 at 08:55
  • you can setup a custom npm registry, and publish the packages to that registry. Especially when the libraries are used on multiple projects. See for example [this article](https://medium.com/engenharia-noalvo/ways-to-have-your-private-npm-registry-and-a-final-diy-solution-eed001a88e74) – JSON Derulo Dec 08 '21 at 09:00
  • @JSONDerulo I'm already using custom npm registry and using these libraries in other project. I just want to install libraries dependencies at once. – Rajantha Fernando Dec 08 '21 at 09:14
  • I would also suggest to consider a monorepo approach, as @31piy already mentioned. An alternative to NX with less boilerplate is [yarn workspaces](https://yarnpkg.com/features/workspaces) – Tino Dec 08 '21 at 09:41

0 Answers0