-
Notifications
You must be signed in to change notification settings - Fork 40
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
Change defaults for reporter #109
Comments
Hi, @jorenmartijn! I think maybe extracting the usage to your own function which returns the notify object with default options is the "best practise" way to solve this. |
Thanks for the quick response! Using your suggestion I wrote the following, which seems to work perfectly :) function notice(options){
var params = options;
params['icon'] = path.join(__dirname, "favicon.png");
return notify(params);
} Regards, |
Good! Note, though, this mutates the object that you passed in. This means that if you send in the same object across several functions, they have the same changes. You can use something like function notice(options){
return notify(Object.assign({}, options, {
icon: path.join(__dirname, "favicon.png")
});
} |
Hi,
I'd like to be able to set my notification icon globally so I don't have to pass it through the .pipe(notify()) command in my gulp file.
Is there anyway I can do that? I found the defaults object in the reporter.js file, but can't figure out how to manipulate that from the gulp file.
Regards,
Joren
The text was updated successfully, but these errors were encountered: