-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathgulpfile.js
31 lines (27 loc) · 808 Bytes
/
gulpfile.js
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
28
29
30
31
var gulp = require('gulp'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer');
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: {
baseDir: "./"
},
open: false,
online: false,
notify: false
});
gulp.watch('scss/*.scss', ['sass']);
gulp.watch(['*.html']).on('change', browserSync.reload);
});
gulp.task('sass', function () {
return gulp.src('scss/**')
.pipe(sass({
outputStyle: 'expanded',
includePaths: ['scss']
}))
.pipe(prefix(['last 5 versions', '> 1%'], { cascade: true }))
.pipe(gulp.dest('css'))
.pipe(browserSync.reload({stream:true}));
});
gulp.task('default', ['serve']);