diff --git a/.travis.yml b/.travis.yml index 47f1d4a0..2012b382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ script: - npm run build - npm run lint - npm test - - npm run test:coverage + - if [[ $TRAVIS_NODE_VERSION = '8' ]]; then npm run test:coverage; fi deploy: provider: npm diff --git a/bin/cli.js b/bin/cli.js index 5dcc650a..1273f523 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,3 +1,9 @@ #!/usr/bin/env node -require('../lib/cli')() +const semver = require('semver') + +if (semver.satisfies(process.version, '>=8')) { + require('../src/cli')() // eslint-disable-line global-require +} else { + require('../lib/cli')() // eslint-disable-line global-require +} diff --git a/package.json b/package.json index 94263e50..b739bed9 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "lint-staged": "^4.2.1", "markdownlint-cli": "^0.3.1", "npm-run-all": "^4.1.1", + "semver": "^5.4.1", "standard-version": "^4.2.0", "yargs": "^9.0.1" },