forked from IllinoisWCS/IllinoisWCS.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (27 loc) · 752 Bytes
/
gulpfile.js
File metadata and controls
31 lines (27 loc) · 752 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
28
29
30
31
var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create();
// Compile the Sass files
gulp.task('sass', function() {
gulp.src('./assets/sass/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./assets/css'))
.pipe(browserSync.reload({
stream: true
}));
});
// Enable live-reload
gulp.task('browserSync', function() {
browserSync.init({
server: {
baseDir: '.'
},
});
});
// Watch the sass files and reload when they chance
gulp.task('watch', ['browserSync', 'sass'], function() {
gulp.watch('./assets/sass/*.scss', ['sass']);
gulp.watch('index.html', browserSync.reload)
});
// Run 'gulp' in the command line
gulp.task('default', ['watch']);