forked from Fantomas42/django-blog-zinnia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (24 loc) · 1.04 KB
/
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
var gulp = require('gulp'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
livereload = require('gulp-livereload');
gulp.task('theme', function() {
return gulp.src('zinnia/static/zinnia/theme/sass/**/*.scss')
.pipe(sass({errLogToConsole: true}))
.pipe(prefix())
.pipe(gulp.dest('zinnia/static/zinnia/theme/css'));
});
gulp.task('admin-dashboard', function() {
return gulp.src('zinnia/static/zinnia/admin/dashboard/sass/*.scss')
.pipe(sass({errLogToConsole: true}))
.pipe(prefix())
.pipe(gulp.dest('zinnia/static/zinnia/admin/dashboard/css'));
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch(['zinnia/static/zinnia/**/*',
'zinnia/templates/**/*']).on('change', livereload.changed);
gulp.watch('zinnia/static/zinnia/theme/sass/**/*.scss', ['theme']);
gulp.watch('zinnia/static/zinnia/admin/dashboard/sass/*.scss', ['admin-dashboard']);
});
gulp.task('default', ['theme', 'admin-dashboard', 'watch']);