Skip to content

Commit c8643b7

Browse files
committed
feat(hooks): print newline after gulp tasks have finished
1 parent e897dac commit c8643b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/cli.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function runWithGulp(argv, taskInstance){
139139
console.error('Do you need to run `npm install`?\n');
140140
process.exit(1);
141141
}
142-
logEvents(gulp);
142+
logEvents(gulp, [beforeHook, afterHook]);
143143

144144
if (gulp.tasks[beforeHook]) {
145145
console.info('\nRunning \'' + beforeHook + '\' Gulp task before ' + cmdName);
@@ -207,7 +207,7 @@ function loadGulpfile(){
207207
return false;
208208
}
209209

210-
function logEvents(gulpInst) {
210+
function logEvents(gulpInst, finalTaskNames) {
211211
gulpInst.on('task_start', function(e) {
212212
// TODO: batch these
213213
// so when 5 tasks start at once it only logs one time with all 5
@@ -220,6 +220,9 @@ function logEvents(gulpInst) {
220220
'Finished', '\'' + chalk.cyan(e.task) + '\'',
221221
'after', chalk.magenta(time)
222222
);
223+
if (finalTaskNames.indexOf(e.task) > -1) {
224+
console.log();
225+
}
223226
});
224227

225228
gulpInst.on('task_err', function(e) {

0 commit comments

Comments
 (0)