Comments (12)
Does this lib fail gracefully if the user doesn't have growl installed on all supported OSes?
from grunt.
No idea, but I'll look into it and we can chat on Monday or whatever
from grunt.
Is there anyway we can add a custom hook for when any tasks fail?
from grunt.
@Jontyy how would you use that? Can you give me an example?
from grunt.
@cowboy Maybe something like
var exec = require('child_process').exec;
config.init({/*...*/});
//whatever the failure listener is
grunt.on('task.fail',function(task){
var cmd = 'notify-send "Grunt - Task failed" '+task; //I'm on ubuntu
exec(cmd);
});
I'm at work so not got much time to comment but something along them lines, obviously the api could be more consistent with what grunt provides already but I imagine it will be trivial for me to make my own failure listener which would work on OS X (at work) and Ubuntu (at home)
Edit:
maybe it would be better on the task object.
task.fail(function(task){/*...*/});
from grunt.
@Jontyy I've created a more general issue for this at #70.
from grunt.
I don't know where this stands anymore, but I started working on this today here. My immediate need is just to be able to see the grunt watch output in growl, so I don't have to switch terminals in order to read them.
Currently, if you add the --growl option to grunt, all log messages are pushed to grunt using the node-growl dependency. I believe that it fails silently if growl is not available on the current platform. All it does is delegate to require('child_process').exec
which doesn't do anything on failed shell commands.
from grunt.
This would be awesome. Is a pull request in the near future?
from grunt.
@ggoforth I have actually finished it, and it works for me, but I don't know if it would be as useful for others. Currently, it takes all output that would go to stdout, and pushes that to growl. Once issue #70 is completed, then this exact issue would be trivial in my code, but I haven't yet attempted to only publish the error notifications to growl.
from grunt.
You guys should checkout Grunt Growl: https://github.com/alextucker/grunt-growl
Haven't tried it with task failures yet.
from grunt.
Here is a quick work around. It uses grunt.utils.hooker
and node-growl.
from grunt.
Once events have been added per #328, you'll be able to implement this entirely on your end using events... so feel free to participate in that discussion!
from grunt.
Related Issues (20)
- grunt.file.copy not compatible with grunt-contrib-copy in case of copying symlink HOT 4
- Getting Started with Grunt HOT 3
- start testing 3 latest stable branches HOT 1
- Removal of support for a NodeJS version is a breaking change - major bump? HOT 2
- grunt v1.6.0 throwing error "SyntaxError: Unexpected token '.'" through npm rimraf package. HOT 6
- Latest version of grunt failing if we use path.join for windows HOT 2
- fix for windows incompatibility issue HOT 1
- Regarding Grunt Version 1.6.0 Release
- Regarding Grunt Version 1.6.0 Release HOT 2
- Add an option to copy task for symlinks
- file.mkdir does not create intermediate directories any more
- watchtask callback not firing for the very first time
- + ~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: Grunt Errord\Grunt.ps HOT 1
- fix : Change twitter icon to new one 'X' HOT 5
- Security Policy needs updating HOT 1
- Issue launching grunt after upgrading to Angular 16 due to locate-path versions HOT 2
- Overeager files interpretation in multi-tasks
- Grunt fails on the mac with nodejs 21.1.0 version
- Onboarding Grunt To OpenJS ESP Program
- BLACK DUCK SCAN Failure related to internal dependency of nopt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt.