mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Have travis cache the npm cache instead of node_modules.
This commit is contained in:
15
.travis.yml
15
.travis.yml
@@ -4,7 +4,7 @@ node_js:
|
|||||||
- "6"
|
- "6"
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- $HOME/.npm
|
||||||
- travis_phantomjs
|
- travis_phantomjs
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -73,17 +73,10 @@ before_install:
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Move lodash-cli node_modules before pruning.
|
# Use lodash-cli from GitHub.
|
||||||
- "mkdir -p ./tmp/lodash-cli/node_modules"
|
|
||||||
- "mv ./node_modules/lodash-cli/node_modules ./tmp/lodash-cli/node_modules || true"
|
|
||||||
- "npm prune"
|
|
||||||
|
|
||||||
# Restore 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"
|
||||||
- "mv ./tmp/lodash-cli/node_modules ./node_modules/lodash-cli/node_modules || true"
|
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
|
||||||
- "cd ./node_modules/lodash-cli && npm prune"
|
- "cd ../../ && npm i --production && cd ../../"
|
||||||
- "mkdir -p ./node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
|
|
||||||
- "cd ../../ && rm -rf .git && npm i --production && cd ../../"
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Detect code coverage.
|
# Detect code coverage.
|
||||||
|
|||||||
Reference in New Issue
Block a user