Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Check for Node v6 or later (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Apr 17, 2017
1 parent 6e7cbf3 commit 1c9de93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions 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 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 1c9de93

Please sign in to comment.