-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Don't run task if Gruntfile was run with errors #1303
Comments
Closing as this doesn't seem like an issue with Grunt but a configuration issue with WebStorm. Please let us know if it is in fact an issue with Grunt. Thanks! |
Yes, you're correct, this issue is not about Grunt itself. I'd say it's about smooth interoperability between Grunt and tools (e.g. IDE). Usually, tools need to list available task, like
Source code of Ideally, grunt could support out-of-the-box dumping tasks description in json format (via some cli option, e.g. gulp v4 has As a small step forward better interop, what do you think about this issue? |
So the feature request here is to provide an API to output the tasks in a JSON format? |
Providing an API is a possible way to improve interop. Other ways are:
IMO, the proper way is introducing a new cli flag. In this case tools don't have to maintain similar small wrappers dumping JSON. I understand it might be taken as overkill, so I'd be happy if grunt tasks just aren't run in case of errors. :) Thanks. Probably, I should have provided better description in the first place. Sorry about that. |
I'm not sure what this means. Are you talking javascript syntax errors? Each task handles it's own errors and then Grunt by default will stop running tasks unless |
Yes, about javascript syntax errors. To be more specific when grunt console runner rejects to run specified task. IIUC, it happens when gruntfile cannot be loaded Line 343 in 2ddec56
|
If requiring Gruntfile throws an error, don't run tasks loaded from additional directory paths (
--tasks
).If it isn't a good idea, could you please advise how a task could use grunt API to figure out whether Gruntfile was required successfully?
Based on https://youtrack.jetbrains.com/issue/WEB-11338:
Even if Gruntfile is incorrect, WebStorm Grunt integration prints:
The text was updated successfully, but these errors were encountered: