Browse Source

require node 11

Gregg Tavares 6 năm trước cách đây
mục cha
commit
385f0240ba
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      build/js/build.js

+ 5 - 0
build/js/build.js

@@ -4,6 +4,11 @@
 
 'use strict';
 
+const requiredNodeVersion = 11;
+if (parseInt((/^v(\d+)\./).exec(process.version)[1]) < requiredNodeVersion) {
+  throw Error(`requires at least node: ${requiredNodeVersion}`);
+}
+
 module.exports = function(settings) { // wrapper in case we're in module_context mode
 
 const cache      = new (require('inmemfilecache'))();