Skip to content

Instantly share code, notes, and snippets.

@niallobrien
Created March 27, 2014 09:35
Show Gist options
  • Save niallobrien/9803777 to your computer and use it in GitHub Desktop.
Save niallobrien/9803777 to your computer and use it in GitHub Desktop.
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