Reputation: 2022
I want to make voice control/feedback/response for my build in gulp. I wrote something like this below, but it is not working. Does anybody know how to fix it? :)
It throws this error.
// Compile Sass, autoprefix properties, generate CSS.
gulp.task('sass', function () {
return sass('src/sass/style.scss', {style: 'compressed'})
.pipe(autoprefixer())
.pipe(rename('style.css'))
.pipe(gulp.dest('src/css/'))
.pipe(gutil.beep()) // beep when build is done
})
Upvotes: 1
Views: 2012
Reputation: 23815
As of now, gulp-util
has the beep
method. So you can add this to the end of your gulp workflow >> .on('end', function () { gutil.beep(); });
Upvotes: 4
Reputation: 35816
As @lsowen pointed out, gulp-util does not have the beep
function anymore, so you should
npm install --save-dev beepbeep
And do something like:
var beep = require('beepbeep');
gulp.task('sass', function () {
return sass('src/sass/style.scss', { style: 'compressed' })
.pipe(autoprefixer())
.pipe(rename('style.css'))
.pipe(gulp.dest('src/css/'))
.on('end', function () { beep(); });
});
Upvotes: 3