Skip to content

Commit 99ccd09

Browse files
author
Tyler Kellen
committed
add support for arbitrary node-flags
1 parent fb8c780 commit 99ccd09

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

bin/gulp.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var archy = require('archy');
99
var Liftoff = require('liftoff');
1010
var tildify = require('tildify');
1111
var interpret = require('interpret');
12+
var v8flags = require('v8flags');
1213
var completion = require('../lib/completion');
1314
var argv = require('minimist')(process.argv.slice(2));
1415
var taskTree = require('../lib/taskTree');
@@ -20,7 +21,8 @@ process.env.INIT_CWD = process.cwd();
2021
var cli = new Liftoff({
2122
name: 'gulp',
2223
completions: completion,
23-
extensions: interpret.jsVariants
24+
extensions: interpret.jsVariants,
25+
nodeFlags: v8flags.fetch()
2426
});
2527

2628
// exit with 0 or 1
@@ -47,7 +49,6 @@ if (!shouldLog) {
4749
gutil.log = function(){};
4850
}
4951

50-
// wire up a few err listeners to liftoff
5152
cli.on('require', function (name) {
5253
gutil.log('Requiring external module', chalk.magenta(name));
5354
});
@@ -56,6 +57,13 @@ cli.on('requireFail', function (name) {
5657
gutil.log(chalk.red('Failed to load external module'), chalk.magenta(name));
5758
});
5859

60+
cli.on('respawn', function (flags, child) {
61+
var nodeFlags = chalk.magenta(flags.join(', '));
62+
var pid = chalk.magenta(child.pid);
63+
gutil.log('Node flags detected:', nodeFlags);
64+
gutil.log('Respawned to PID:', pid);
65+
});
66+
5967
cli.launch({
6068
cwd: argv.cwd,
6169
configPath: argv.gulpfile,

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
"deprecated": "^0.0.1",
3131
"gulp-util": "^3.0.0",
3232
"interpret": "^0.3.2",
33-
"liftoff": "^0.12.0",
33+
"liftoff": "^0.13.2",
3434
"minimist": "^1.1.0",
3535
"orchestrator": "^0.3.0",
3636
"pretty-hrtime": "^0.2.0",
3737
"semver": "^3.0.1",
3838
"tildify": "^1.0.0",
39+
"v8flags": "^1.0.1",
3940
"vinyl-fs": "^0.3.0"
4041
},
4142
"devDependencies": {

0 commit comments

Comments
 (0)