在这里我没有得到任何输出,并命令将永远运行下去:作为命令运行时在Grunt中显示输出?
grunt.registerTask('serve', function() {
var done = this.async();
grunt.util.spawn({
cmd: 'jekyll',
args: ['serve'],
stdio: 'inherit'
}, function (err, res, exit_code) {
res.stdout && console.info(res.stdout);
exit_code && console.error(res.stderr);
done(err);
});
});
我想输出(和命令运行,直到错误或中断)。