-
Notifications
You must be signed in to change notification settings - Fork 70
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
Warn on stylus errors #76
Conversation
Ping @cowboy @tkellen, this gets requested both ways often and I unfortunately agree with the arguments made on either side. Aborting on error would require a |
We could add (or plugin) a flag to grunt monkey patching Then we don't have to add a new flag to each task individually. Thoughts? |
FWIW, you can use |
👎 it should fail. it should be up to the user to somehow override it, but failing is the only sane default. this is to make it work in watch right? can't we somehow fix watch instead? |
Why not just use |
@sindresorhus To me, this is just about agreeing and normalizing all contrib plugins to either abort on errors or just warn on errors. I don't know what errors are causing the watch to fail, for me it works with both spawn/nospawn: https://gist.github.com/shama/8270974 |
I've run into problems with tasks that do more than watch: build everything, start a server, then watch. If anything fails before the watch starts, I have to kick it off again. |
@hurrymaplelad Wait, before the watch starts or before the watch starts again? Starts again = watch task was already running, files triggered a task run and started the watch task again. If it is before the watch starts, then it has nothing to do with the watch task. |
@shama Before the watch starts. Agreed, nothing to do with the watch task directly, but the only times I've wanted to continue on error are when watch will eventually start, so when I fix the logged error I see the built styles without running another grunt task. |
@hurrymaplelad Does |
|
I'd be fine closing both my pull requests, keep failing on errors. I'll use |
Related gruntjs/grunt-contrib-csslint#21 ❕ |
@hurrymaplelad While this may not be the right forum, you could break out your tasks with |
Fixes #51. Alternative to #52 & #70 requested by @shama.
Log out stylus errors without exiting, and without an error code. Not sure I like this. I'm using grunt-contrib-stylus as part of the build script on a continuous deployment server. It's a little scary that a deploy could go succeed when styles failed to build...
@shama @cowboy, are there other strategies for failing the build on stylus errors? Parse the grunt output and look for errors?