diff options
Diffstat (limited to 'build/tasks/lib/verifyNodeVersion.js')
-rw-r--r-- | build/tasks/lib/verifyNodeVersion.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build/tasks/lib/verifyNodeVersion.js b/build/tasks/lib/verifyNodeVersion.js new file mode 100644 index 000000000..80d57ed6e --- /dev/null +++ b/build/tasks/lib/verifyNodeVersion.js @@ -0,0 +1,12 @@ +"use strict"; + +const { version } = require( "process" ); +const nodeV16OrNewer = !/^v1[0-5]\./.test( version ); + +module.exports = function verifyNodeVersion() { + if ( !nodeV16OrNewer ) { + console.log( "Old Node.js detected, task skipped..." ); + return false; + } + return true; +}; |