Skip to content

Conversation

rdhallman
Copy link

@rdhallman rdhallman commented Oct 16, 2020

… parameters.

Jake already accepts parameters via the [arg1,arg2] syntax, but this syntax is verbose, spacing sensitive and zsh forces use of backslashes: \[arg1,arg2\]. I'd prefer to be able to do this:

$ jake build core plugins web-client

Instead of:

$ jake build\[core,plugins,web-client\]

With this commit, if a task is declared with greedy option set, it will consume all remaining CLI params as arguments:

task('build', {greedy: true}, function(...args) {
   jake.exec("yarn build " + args.join(" "), {stdout: true, stderr: true});
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant