sudo: false
language: node_js
cache:
  directories:
    - node_modules
branches:
  only:
    - master
notifications:
  email: false
node_js:
  - '0.10'
  - '0.12'
  - '4'
  - '5'
before_install:
  - npm i -g npm@^3.0.0
before_script:
  - npm prune
script:
  - npm run test
  - npm run check-coverage
  - npm run build
after_success:
  - npm run report-coverage
  - travis-after-all && npm run semantic-release

sudo: false
language: node_js
cache:
  directories:
    - node_modules
branches:
  only:
    - master
notifications:
  email: false
node_js:
  - '0.10'
  - '0.12'
  - '4'
  - '5'
before_install:
  # detect if the current build's node version is < 4
  # if yes, install latest npm version 2.x
  # if not, install latest npm version 3.x
  - if [[ `node -v | sed 's/[^0-9\.]//g'` < 4 ]]; then npm i -g npm@^2.0.0; else npm i -g npm@^3.0.0; fi
before_script:
  - npm prune
script:
  - npm run test
  - npm run check-coverage
  - npm run build
after_success:
  - npm run report-coverage
  - travis-after-all && npm run semantic-release

Build with multiple npm versions on Travis
chore(ci): Build with multiple npm versions on Travis