Skip to content

Commit 52c1e33

Browse files
committed
Release 0.2.10
1 parent aa61e4a commit 52c1e33

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎index.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
2-
31
module.exports = require('./lib/gulp-runtime');

‎lib/command/consumer.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ module.exports = function defaultConsumer(argv, args, command){
1212

1313
var scope = this.config.scope;
1414
command.handle.call(scope ? require(scope) : this, argv, args);
15-
16-
// consume the arguments
17-
argv = argv.filter(function(arg){
18-
return command.completion.indexOf(arg) === -1;
19-
});
15+
// Note : it would be optimal to consume arguments here
16+
// but it has to be done on the command at the moment.
2017
}
2118

2219
var xInterface = terminal.getInterface();

‎lib/gulp-runtime.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,16 @@ runtime.completion(function(){
9595
tasks.splice(tasks.indexOf('default'), 1);
9696
}
9797

98+
// Consume the arguments!
9899
tasks = tasks.filter(function(name){
99-
return gulp.tasks[name];
100+
101+
var task = gulp.tasks[name];
102+
103+
if(task){
104+
argv.splice(argv.indexOf(task.name), 1);
105+
}
106+
107+
return task;
100108
});
101109

102110
if(tasks.length !== 0){

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-runtime",
3-
"version": "0.2.9",
3+
"version": "0.2.10",
44
"description": "gulp runtime interface",
55
"author": "Javier Carrillo <stringparser@gmail.com> (http://www.stringparser.com)",
66
"repository": {

0 commit comments

Comments
 (0)