Add node_modules to travis cache.

This commit is contained in:
John-David Dalton
2016-08-06 22:46:09 -07:00
parent a546842792
commit f9a4705c9c

View File

@@ -3,8 +3,9 @@ sudo: false
node_js: node_js:
- "6" - "6"
cache: cache:
directories: directories:
- travis_phantomjs - node_modules
- travis_phantomjs
env: env:
global: global:
- BIN="node" ISTANBUL=false OPTION="" - BIN="node" ISTANBUL=false OPTION=""
@@ -64,6 +65,7 @@ before_install:
node ./test/remove.js "$PTRN" ./lodash.js node ./test/remove.js "$PTRN" ./lodash.js
done done
fi fi
- "rm -rf ./node_modules/lodash-cli"
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli" - "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli"
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json" - "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
- "cd ../../ && npm i && cd ../../" - "cd ../../ && npm i && cd ../../"