Skip to content

Commit

Permalink
- Update travis for some conditional installs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Mar 27, 2020
1 parent 296103f commit af6a94a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ node_js:
- 10
- 12

before_install:
- npm config set depth 0
before_script: >
node_version=$(node -v);
if [ ${node_version:3:1} = "." ]; then
echo "Node 10+"
npm install --no-save "eslint@6"
else
if [ ${node_version:1:1} -ge 8 ]; then
echo "Node 8+"
npm install --no-save "eslint@5"
else
echo "Node <= 6"
npm install --no-save "eslint@5" mocha@6.2.2 nyc@14.1.1
fi
fi
matrix:
include:
- name: Lint
Expand Down

0 comments on commit af6a94a

Please sign in to comment.