The readme suggests the spawned process is returned.
It doesn't look like it is, though
|
run: function (args, options, livereload) { |
|
//deal with args |
|
if(util.isArray(args) && args.length){ |
|
config.args = args; |
|
} |
|
|
|
//deal with options |
|
config.options = merge(config.options, options || {}); |
|
|
|
//deal with livereload |
|
if(livereload === false){ //livereload disabled |
|
config.livereload = false; |
|
}else if(livereload){ |
|
if(typeof livereload === 'object'){ |
|
config.livereload = livereload; |
|
}else{ |
|
config.livereload.port = livereload; |
|
} |
|
} |
|
|
|
if (server) { // server already running |
|
debug(info('kill server')); |
|
server.kill('SIGKILL'); |
|
//server.removeListener('exit', callback.serverExit); |
|
server = undefined; |
|
} else { |
|
if(config.livereload){ |
|
lr = tinylr(config.livereload); |
|
lr.listen(config.livereload.port, callback.lrServerReady); |
|
} |
|
} |
|
|
|
server = spawn('node', config.args, config.options); |
|
server.stdout.setEncoding('utf8'); |
|
server.stderr.setEncoding('utf8'); |
|
|
|
server.stdout.on('data', callback.serverLog); |
|
server.stderr.on('data', callback.serverError); |
|
server.once('exit', callback.serverExit); |
|
|
|
process.listeners('exit') || process.once('exit', callback.processExit); |
|
}, |
The readme suggests the spawned process is returned.
It doesn't look like it is, though
gulp-express/index.js
Lines 70 to 111 in 9a3c842