Skip to content

Commit 00fdcf4

Browse files
petebacondarwinIgorMinar
authored andcommitted
build: allow check-environment.js to be run directly
1 parent ab0db66 commit 00fdcf4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/check-environment.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ try {
5353
printWarning(issues);
5454
}
5555

56+
if (require.main === module) {
57+
// we are running this script directly so just run checkEnvironment against the main angular
58+
// package.json
59+
var engines = require(__dirname + '/../package.json').engines;
60+
checkEnvironment({
61+
requiredNodeVersion: engines.node,
62+
requiredNpmVersion: engines.npm,
63+
requiredYarnVersion: engines.yarn
64+
});
65+
}
66+
5667
function checkEnvironment(reqs) {
5768
exec('npm --version', function(npmErr, npmStdout) {
5869
exec('yarn --version', function(yarnErr, yarnStdout) {

0 commit comments

Comments
 (0)