language: node_js
node_js:
 - "node"
 - "8.0"
 - "7.0"
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
before_script:
  - npm install -g jsinspect xo ava nyc
  - npm install
cache:
  directories:
     - "node_modules"
script: 
  - cd ./js
  - npm run travis

after_success: npm run coverage
language: node_js
node_js:
 - "node"
 - "8.0"
 - "7.0"
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
before_script:
  - npm install -g jsinspect xo ava nyc && npm install
cache:
  directories:
     - "node_modules"
script: 
  - cd ./js
  - npm run travis

after_success: npm run coverage
Install node modules before running scripts
Install node modules before running scripts
