Skip to content

Commit

Permalink
Merge pull request #590 from feross/legacy
Browse files Browse the repository at this point in the history
Improve standard v8 behavior on legacy versions of Node
  • Loading branch information
feross authored Aug 18, 2016
2 parents 36c14d8 + 85e19d6 commit fd7fe77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions bin/cmd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env node

var opts = require('../options')
require('standard-engine').cli(opts)
if (process.version.match(/v(\d+)\./)[1] < 4) {
console.error('standard: Node v4 or greater is required. `standard` did not run.')
} else {
var opts = require('../options')
require('standard-engine').cli(opts)
}

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"standard-packages": "^3.1.9",
"tape": "^4.6.0"
},
"engines": {
"node": ">=4"
},
"homepage": "http://standardjs.com",
"keywords": [
"JavaScript Standard Style",
Expand Down Expand Up @@ -62,11 +65,11 @@
"url": "git://github.com/feross/standard.git"
},
"scripts": {
"update-authors": "./bin/update-authors.sh",
"test": "./bin/cmd.js --verbose && tape test/*.js",
"test-disabled": "npm test -- --disabled",
"test-offline": "npm test -- --offline",
"test-offline-quick": "npm test -- --offline --quick",
"test-quick": "npm test -- --quick"
"test-quick": "npm test -- --quick",
"update-authors": "./bin/update-authors.sh"
}
}

0 comments on commit fd7fe77

Please sign in to comment.