forked from Fantomas42/django-blog-zinnia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (26 loc) · 901 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
33
34
35
36
37
38
var gulp = require('gulp'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
livereload = require('gulp-livereload');
var HTML = 'zinnia/templates/**/*.html',
IMG = 'zinnia/static/zinnia/img/*',
JS = 'zinnia/static/zinnia/js/**/*.js',
SASS = 'zinnia/static/zinnia/sass/**/*.scss',
CSS = 'zinnia/static/zinnia/css/*.css';
gulp.task('sass', function() {
return gulp.src(SASS)
.pipe(sass({errLogToConsole: true}))
.pipe(prefix())
.pipe(gulp.dest('zinnia/static/zinnia/css'));
});
gulp.task('watch', function() {
var server = livereload();
gulp.watch([CSS, JS, IMG], function(file) {
server.changed(file.path);
});
gulp.watch(HTML, function(file) {
server.changed('.');
});
gulp.watch(SASS, ['sass']);
});
gulp.task('default', ['sass', 'watch']);