Skip to content

Commit 734639c

Browse files
committed
chore(serve): continue command after watch ready hook
1 parent 2772a4c commit 734639c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/cli.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,15 @@ Cli.runNpmHook = function runNpmHook(hook) {
327327
log.error('Unable to run spawn command ' + err);
328328
});
329329
spawned.stdout.on('data', function(data) {
330-
log.info(data.toString());
330+
var dataLines = data.toString().split('\n');
331+
for (var i = 0; i < dataLines.length; i++) {
332+
if (dataLines[i].length) {
333+
log.info(dataLines[i]);
334+
if (dataLines[i].indexOf('watch ready') > -1) {
335+
return q.resolve();
336+
}
337+
}
338+
}
331339
});
332340
spawned.stderr.on('data', function(data) {
333341
log.info(data.toString());

0 commit comments

Comments
 (0)