1 | #!/usr/bin/env node
|
2 |
|
3 |
|
4 |
|
5 | 'use strict';
|
6 |
|
7 | var ver = process.versions.node;
|
8 | var majorVer = parseInt(ver.split('.')[0], 10);
|
9 |
|
10 | if (majorVer < 4) {
|
11 | console.error('Node version ' + ver + ' is not supported, please use Node.js 4.0 or higher.');
|
12 | process.exit(1);
|
13 | } else {
|
14 | var dirPath = '../lib/';
|
15 | var v8CompileCachePath = dirPath + 'v8-compile-cache';
|
16 | var fs = require('fs');
|
17 |
|
18 | if (fs.existsSync(v8CompileCachePath)) {
|
19 | require(v8CompileCachePath);
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | var cli = require(dirPath + 'cli');
|
26 | if (!cli.autoRun) {
|
27 | cli.default();
|
28 | }
|
29 | }
|