Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds feature to allow tasks to be greedy, consuming all remaining CLI… #382

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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