-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error out if using node less than 8.10, phetsims/chipper#737
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2019, University of Colorado Boulder | ||
|
||
/** | ||
* Error out if Node version is out of date. Uses process.version | ||
* | ||
* @author Michael Kauzmann (PhET Interactive Simulations) | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// constants | ||
const NODE_VERSION_STRING_PARTS = process.version.replace( 'v', '' ).split( '.' ); | ||
const NODE_MAJOR_VERSION = parseInt( NODE_VERSION_STRING_PARTS[ 0 ], 10 ); | ||
const NODE_MINOR_VERSION = parseInt( NODE_VERSION_STRING_PARTS[ 1 ], 10 ); | ||
if ( NODE_MAJOR_VERSION < 8 || ( NODE_MAJOR_VERSION === 8 && NODE_MINOR_VERSION < 10 ) ) { | ||
throw new Error( 'Node 8.10 or greater is needed to run PhET build tools' ); | ||
} |