Skip to content

Commit

Permalink
Check for Node v6 or later (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Aug 24, 2018
1 parent c8e8be4 commit f10ff19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"commander": "^2.9.0",
"generator-feathers": "1.0.2",
"generator-feathers-plugin": "0.10.0",
"semver": "^5.3.0",
"yeoman-environment": "^1.6.6"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import yeoman from 'yeoman-environment';
import program from 'commander';
import meta from 'generator-feathers/meta';
import semver from 'semver';

const env = yeoman.createEnv();

Expand All @@ -23,6 +24,11 @@ module.exports = function(argv, generatorOptions = {
program.version(require('../package.json').version)
.usage('generate [type]');

if(!semver.satisfies(process.version, '>= 6.0.0')) {
console.error('The Feathers CLI and generated application requires Node v6.0.0 or later.');
return process.exit(1);
}

program.command('generate [type]')
.alias('g')
.description(description)
Expand Down

0 comments on commit f10ff19

Please sign in to comment.