Skip to content

Commit 391d7f5

Browse files
author
benholloway
committed
allowed direct command line invocation without gulp keyword
1 parent 1994e2a commit 391d7f5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ function hr(char, length, title) {
138138

139139
// DEFAULT ---------------------------------
140140
var isMinify = (process.argv[process.argv.length - 1] !== 'nominify');
141+
var task = process.argv[process.argv.length - 1 - Number(!isMinify)];
141142

142143
gulp.task('default', [ 'watch' ]);
143144

@@ -416,4 +417,9 @@ gulp.task('watch', [ 'server' ], function() {
416417
name: 'HTML | BOWER',
417418
emitOnGlob: false
418419
}, queue.getHandler('html', 'reload'));
419-
});
420+
});
421+
422+
// KICKOFF ---------------------------------
423+
if (process.argv.indexOf('gulp') < 0) {
424+
gulp.start(gulp.hasTask(task) ? task : 'default');
425+
}

0 commit comments

Comments
 (0)