Skip to content

Commit ba5c8ed

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

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bin/gulp-es6-modular.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
var gulp = require('../index');
2+
3+
var task = process.argv[1];
4+
gulp.start(gulp.hasTask(task) ? task : 'default');

index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ 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)];
142141

143142
gulp.task('default', [ 'watch' ]);
144143

@@ -419,7 +418,4 @@ gulp.task('watch', [ 'server' ], function() {
419418
}, queue.getHandler('html', 'reload'));
420419
});
421420

422-
// KICKOFF ---------------------------------
423-
if (process.argv.indexOf('gulp') < 0) {
424-
gulp.start(gulp.hasTask(task) ? task : 'default');
425-
}
421+
module.exports = gulp;

0 commit comments

Comments
 (0)