Skip to content

Commit

Permalink
add node engine to package.json and call checkNodeVersion function in…
Browse files Browse the repository at this point in the history
… cli
  • Loading branch information
conorhastings authored and conorhastings committed Jul 23, 2016
1 parent ab90e7f commit b3583c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions global-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function run(root, appName, version, verbose) {
return;
}

checkNodeVersion();

var scriptsPath = path.resolve(
process.cwd(),
'node_modules',
Expand Down Expand Up @@ -157,5 +159,6 @@ function checkNodeVersion() {
process.version,
packageJson.engines.node
);
process.exit(1);
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"description": "Configuration and scripts for Create React App.",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
"engines": {
"node": ">=4"
},
"bugs": {
"url": "https://github.com/facebookincubator/create-react-app/issues"
},
Expand Down

0 comments on commit b3583c1

Please sign in to comment.