You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a child project, I have a "Basic task" that accepts an argument. From within the child project, I can run:
grunt task:argument
From the "parent" project, I would like to issue a command like:
grunt hub:child:task:argument
but this ends up running the [task, argument] tasks on the child project -> "Task 'argument' not found"
I have found a workaround:
grunt hub:child:'task\:argument'
which ends up running task:argument on the child, but this feels kinda hacky.
Since the 'child' gruntfile is never loaded by grunt-hub, it does not seem feasible to check whether the task exists beforehand - so what is the best option here? A character other than ":"? Perhaps even just documenting this workaround?
Thanks!
The text was updated successfully, but these errors were encountered:
The solution you found grunt hub:child:'task\:argument' is your best bet. I don't really want to implement a cli convention outside of default grunt at this time.
+1 for this. the workaround mentioned above works if you are running commands directly from the command line, but not if you are including tasks within registerTask() within Gruntfile.js. ie, you can't do this:
grunt.registerTask('test_e2e', 'Run e2e tests against all applications.', [
'hub:client_app:test:e2e',
'hub:client_docs:test:e2e'
]);
or this:
grunt.registerTask('test_e2e', 'Run e2e tests against all applications.', [
"hub:client_app:'test\:e2e'",
"hub:client_docs:'test\:e2e'"
]);
In a child project, I have a "Basic task" that accepts an argument. From within the child project, I can run:
From the "parent" project, I would like to issue a command like:
but this ends up running the [task, argument] tasks on the child project -> "Task 'argument' not found"
I have found a workaround:
which ends up running
task:argument
on the child, but this feels kinda hacky.Since the 'child' gruntfile is never loaded by grunt-hub, it does not seem feasible to check whether the task exists beforehand - so what is the best option here? A character other than ":"? Perhaps even just documenting this workaround?
Thanks!
The text was updated successfully, but these errors were encountered: