Gulp-sass error with notify

前端 未结 5 2062
粉色の甜心
粉色の甜心 2020-12-28 20:12

I wondered if there is a way to have notify display a message on gulp-sass error. preferably the actual message that is displayed in the console.

my gulp task looks

5条回答
  •  醉酒成梦
    2020-12-28 21:02

    With gulp-sass v2.0.4, this works:

    .pipe(sass())
    .on('error', notify.onError(function (error) {
       return 'An error occurred while compiling sass.\nLook in the console for details.\n' + error;
    }))
    

提交回复
热议问题