forked from csmberkeley/csmberkeley.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (23 loc) · 738 Bytes
/
gulpfile.js
File metadata and controls
27 lines (23 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var minify = require('gulp-minify-css');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
gulp.task('sass', function() {
var scssStream = gulp.src('sass/theme.scss')
.pipe(sass())
.pipe(concat('style.css'))
.pipe(minify())
.pipe(gulp.dest('css'))
.pipe(reload({ stream:true }));
return scssStream;
});
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: true
});
gulp.watch('sass/*.scss', ['sass']);
gulp.watch('templates/**/*.html').on('change', reload);
gulp.watch('js/**/*.js').on('change', reload);
});