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 installif contents ofpackage.json'sdevdependencies,dependencieschanged, note assumesnode_modulespersists across different builds might not helpful if ci server start scratch - npm-install-cache runs
npm install, copies currentnode_modulesfolder (to somewhere in\tmp), if call script again verify any changes package.json (instead of changes done ondevdependenciesordependencies), if didn't change copynode_modulesfolder stored in\tmp, limitation see it's not cross platform , cache folder\tmperased on reboot (or maybe when process finished!)
the second package might not work seems place start :)
Comments
Post a Comment