build(npm): short-circuit npm install if node_modules are healthy

Closes #8627
This commit is contained in:
Pawel Kozlowski
2016-05-13 01:01:33 +02:00
parent 4ddf5536b4
commit 05266241af
4 changed files with 3 additions and 18 deletions

View File

@ -27,13 +27,8 @@ echo 'travis_fold:end:install-npm'
# Install all npm dependencies according to shrinkwrap.json
# note: package.json contain preinstall and postintall hooks that can short-circuit
# the installation if node_modules is up to date
echo 'travis_fold:start:install.node_modules'
if [[ ${TRAVIS} ]]; then
node tools/npm/check-node-modules --purge
fi
npm install
node tools/npm/check-node-modules --purge || npm install
echo 'travis_fold:end:install.node_modules'