Skip to content

Commit d49a411

Browse files
Added new option onError
Hi @C-Lodder ! If you don't like `grunt.event.emit('grunt-postcss-error', error);` look please the new option `onError` This is needed to access errors from `postcss` Thank you.
1 parent ad6affb commit d49a411

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tasks/postcss.js

+5
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ module.exports = (grunt) => {
246246

247247
done();
248248
}).catch((error) => {
249+
250+
if(options.onError != undefined && typeof options.onError === 'function'){
251+
options.onError(error);
252+
}
253+
249254
if (error.name === 'CssSyntaxError') {
250255
grunt.fail.fatal(error.message + error.showSourceCode());
251256
} else {

0 commit comments

Comments
 (0)