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

Updates timestamp though task has failed when running from Netbeans/Webstorm #70

Open
aszczepanek opened this issue Jan 23, 2015 · 0 comments

Comments

@aszczepanek
Copy link

Many IDEs today have simple integration with grunt. When running task like 'newer:jshint:files' from Netbeans or Webstorm, grunt-newer writes timestamp in his cache directory though jshint task failed due to errors and task newer-post hasn't run.

When running from OS shell the same task it works properly, and timestamp doesn't get overwritten when it shouldn't.

I cannot force other people from project's team to use it from separate console because it's very inconvinient to have one more window, but I would like to speed up jshint. Unfortunately running it from IDE is now pretty useless, because it's easy to fire grunt-watch more than once and miss some errors from JSHint.

I would suggest to not rely on operating system modification date, but instead manually write timestamp to file in .cache directory only in newer-post task.

Updated:
I looked a bit more into this issue, and it seems, that newer-postrun task gets fired even though jshint fails, but it doesn't show up in the console.

I probably managed to fix it by adding the following line:

grunt.log.writeln('POSTRUN');
+this.requires(taskName + ':' + targetName);

in the newer-postrun task which according to grunt's documentation does what it should - even if it gets fired it will fail if jshint task failed. I checked, and with this line, the problem doesn't occur.

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

1 participant