Skip to content

Commit

Permalink
perf: prefer not babel code in Node 8+ (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Sep 24, 2017
1 parent 0ce44e4 commit cb62636
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
@@ -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
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit cb62636

Please sign in to comment.