Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
sass = require('gulp-sass'),
gutil = require('gulp-util'),
notify = require('gulp-notify'),
browserSync = require('browser-sync');
gulp.task('sass', function () {
gulp.src('scss/app.scss')
.pipe(plumber())
.pipe(sass({includePaths: ['scss']}))
.pipe(notify({ message: 'Sass compiled.' }))
.pipe(gulp.dest('stylesheets'));
})
gulp.task('browser-sync', function() {
browserSync.init(["stylesheets/*.css", "js/*.js", "**/*.html"], {
server: {
baseDir: "./"
}
});
});
gulp.task('default', ['sass', 'browser-sync'], function () {
gulp.watch("scss/**/*.scss", ['sass'])
.on('error', gutil.log);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.