Sunday, 16 April 2017

How do I install specific versions / tags of all npm dependencies

We have a large project involving multiple node modules. We have 3 levels in our development model.

  • develop
  • stage
  • production

We would like to publish modules to our private registry with develop, stage and production tags and expect CI tool to build and install the deps based on these tags.

Now for deploying to development environment CI can just do npm install on the parent module and all deps with latest versions gets installed. No worries here.

However if CI wants to push something to stage / production environment how do I tell npm install to pick dependency versions tagged as stage / production.

I know if I want to install a particular version of a dependency I can specify npm install package@version. But since we have very huge number of dependencies this approach is not feasible for us.

We are open to suggestions for altering our development model as well. Any help would be appreciated.



via user103054

No comments:

Post a Comment