How to set npm not to install packages that had been installed globally? -


my project references mocha, phantomjs, etc, takes lot of time download during npm install. not problem in local machine because download them once , can use them forever unless decide manually upgrade them.

however, in ci machine, jenkins server need download them every time did git commit , git push testing , deploy.

so can speed process set npm not download these slow packages remote server? rather, install them local cache or not install them if installed them globally?

anyone knows how configure that?

i found packages might helpful

  • npm-install-changed run npm install if contents of package.json's devdependencies , dependencies changed, note assumes node_modules persists across different builds might not helpful if ci server start scratch
  • npm-install-cache runs npm install , copies current node_modules folder (to somewhere in \tmp), if call script again verify any changes package.json (instead of changes done on devdependencies or dependencies), if didn't change copy node_modules folder stored in \tmp, limitation see it's not cross platform , cache folder \tmp erased on reboot (or maybe when process finished!)

the second package might not work seems place start :)


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -