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

How to call jake --parameter in a jakefile? #254

Closed
kud opened this issue Jun 3, 2014 · 7 comments
Closed

How to call jake --parameter in a jakefile? #254

kud opened this issue Jun 3, 2014 · 7 comments

Comments

@kud
Copy link

kud commented Jun 3, 2014

https://twitter.com/_kud/status/473828507534254081

The dirty way:

task('default', function() {
  jake.exec('jake --tasks', { interactive: true })
})
@mde
Copy link
Contributor

mde commented Jun 3, 2014

Wait, I'm not sure what you're asking for here -- do you want a way to set the default task? Or are you asking how to pass CLI args to an embedded instance of Jake?

@kud
Copy link
Author

kud commented Jun 3, 2014

Define the default task is just naming it 'default' but i would like to
call jake "--tasks" function in a task, directly via JavaScript.
On 3 Jun 2014 19:43, "Matthew Eernisse" notifications@github.com wrote:

Wait, I'm not sure what you're asking for here -- do you want a way to set
the default task? Or are you asking how to pass CLI args to an embedded
instance of Jake?


Reply to this email directly or view it on GitHub
#254 (comment).

@mde
Copy link
Contributor

mde commented Jun 3, 2014

Ah, now I understand. Internally, the jake -T CLI command just calls jake.showAllTaskDescriptions. I've updated the doc here to indicate this: https://github.com/mde/jake#showing-the-list-of-tasks

@mde mde closed this as completed Jun 3, 2014
@kud
Copy link
Author

kud commented Jun 3, 2014

Thank you very well @mde ;)

@kud
Copy link
Author

kud commented Jun 4, 2014

Works like a charm!

task('default', function() {
  jake.showAllTaskDescriptions()
})

@kud
Copy link
Author

kud commented Jun 4, 2014

Even better:

task('default', jake.showAllTaskDescriptions)

@mde
Copy link
Contributor

mde commented Jun 4, 2014

Excellent. :)

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

No branches or pull requests

2 participants