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 ofpackage.json
'sdevdependencies
,dependencies
changed, note assumesnode_modules
persists across different builds might not helpful if ci server start scratch - npm-install-cache runs
npm install
, copies currentnode_modules
folder (to somewhere in\tmp
), if call script again verify any changes package.json (instead of changes done ondevdependencies
ordependencies
), if didn't change copynode_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
Post a Comment