-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
32 lines (27 loc) · 913 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
32
const gulp = require('gulp');
const livereload = require('gulp-livereload');
const sass = require('gulp-sass');
const autoprefixer = require('autoprefixer');
const postcss = require('gulp-postcss');
sass.compiler = require('node-sass');
const cssMatch = ['**/*.scss', '!node_modules/**/*.scss'];
gulp.task('scss', function () {
var processors = [
autoprefixer
];
return gulp.src(cssMatch, {base: './'})
.pipe(sass().on('error', sass.logError))
.pipe(postcss(processors))
.pipe(gulp.dest(''))
.pipe(livereload());
});
/* Watch Files For Changes */
gulp.task('watch', function () {
livereload.listen();
/* Trigger a live reload on any Django template changes */
gulp.start('scss');
gulp.watch('**/*.html').on('change', livereload.changed);
gulp.watch('**/*.svg').on('change', livereload.changed);
gulp.watch(cssMatch, ['scss']);
});
gulp.task('default', ['watch']);