2014-12-05 19:26:30 -05:00
|
|
|
var util = require('./util');
|
|
|
|
var spawn = require('child_process').spawn;
|
|
|
|
|
|
|
|
module.exports = function(gulp, plugins, config, module) {
|
|
|
|
return function() {
|
2015-04-06 17:48:07 -04:00
|
|
|
var pubMode = config.mode || 'debug';
|
|
|
|
var pubArgs = ['serve', '--mode', pubMode];
|
|
|
|
return util.streamToPromise(spawn(config.command, pubArgs, {
|
2014-12-05 19:26:30 -05:00
|
|
|
cwd: config.path, stdio: 'inherit'
|
|
|
|
}));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|