Created
November 18, 2015 15:45
-
-
Save biwin/0abbba2ff4866bda3246 to your computer and use it in GitHub Desktop.
starts server on port 8000, compiles sass and reloads on filechanges.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
connect = require('gulp-connect'); | |
connect.server({port: 8000, livereload: true}); | |
gulp.task('sass', function () { | |
gulp.src('scss/*.scss') | |
.pipe(sass({outputStyle: 'compressed'})) | |
.pipe(gulp.dest('css')); | |
}); | |
gulp.task('reload', function () { | |
gulp.src('*.html') | |
.pipe(connect.reload()); | |
}); | |
gulp.task('default', function() { | |
gulp.watch(['*.html'],['reload']); | |
gulp.watch('scss/*.scss', ['sass','reload']); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment