Skip to content

Commit 33af80c

Browse files
committed
chore(hooks): print hook messages before running gulp
1 parent d6a98f0 commit 33af80c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/cli.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ function runWithGulp(argv, taskInstance){
141141
}
142142
logEvents(gulp);
143143

144+
if (gulp.tasks[beforeHook]) {
145+
console.info('\nRunning \'' + beforeHook + '\' Gulp task before ' + cmdName);
146+
}
144147
return Q.nfcall(gulp.start.bind(gulp), beforeHook).then(
145148
function(){
146149
// Only some commands return promises, so wrap it
@@ -168,7 +171,10 @@ function runWithGulp(argv, taskInstance){
168171
return Q.fcall(taskInstance.run.bind(taskInstance), Cli, argv);
169172
}
170173
).then(function(){
171-
return Q.nfcall(gulp.start.bind(gulp), argv._[0] + ':after');
174+
if (gulp.tasks[beforeHook]) {
175+
console.info('\nRunning \'' + afterHook + '\' Gulp task after ' + cmdName);
176+
}
177+
return Q.nfcall(gulp.start.bind(gulp), afterHook);
172178
});
173179
}
174180

0 commit comments

Comments
 (0)