Skip to content

Commit

Permalink
Add an alternate gulpfile from BrowserSync/gulp-browser-sync#26 (comm…
Browse files Browse the repository at this point in the history
  • Loading branch information
sogko committed Aug 15, 2014
1 parent e9ac4dc commit d516ccc
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions gulpfile-jesse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
var gulp = require('gulp'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-sass'),
path = require('path'),
minifyCSS = require('gulp-minify-css'),
autoprefixer = require('gulp-autoprefixer'),
rename = require("gulp-rename");

var config = {
proxy: "localhost:3000"
}

// browser-sync task for starting the server.
gulp.task('browser-sync', function() {
browserSync(config)
});

// Sass task, will run when any SCSS files change & BrowserSync
// will auto-update browsers

gulp.task('sass', function () {
return gulp.src('web-app/css/**/*.scss')
.pipe(sass())
.pipe(autoprefixer('last 2 version'))
.pipe(minifyCSS({keepSpecialComments:0}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('web-app/css/'))
.pipe(reload({stream:true}));
});

// Default task to be run with `gulp`
gulp.task('default', ['sass','browser-sync'], function () {
gulp.watch("web-app/css/**/*.scss", ['sass']);
});

0 comments on commit d516ccc

Please sign in to comment.