-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
35 lines (28 loc) · 1.12 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
'use strict';
var gulp = require('gulp');
var clean = require('gulp-clean');
var sass = require('gulp-sass');
var csso = require('gulp-csso');
gulp.task('sass:main', function () {
return gulp.src('./spritesanddice/static/scss/main/main.scss')
.pipe(sass().on('error', sass.logError))
.pipe(csso()) // Minify CSS
.pipe(gulp.dest('./spritesanddice/static/css'));
});
gulp.task('sass:admin', function () {
return gulp.src('./spritesanddice/static/scss/admin/admin.scss')
.pipe(sass().on('error', sass.logError))
.pipe(csso()) // Minify CSS
.pipe(gulp.dest('./spritesanddice/static/css'));
});
gulp.task('sass:userbar', function () {
return gulp.src('./spritesanddice/static/scss/userbar.scss')
.pipe(sass().on('error', sass.logError))
.pipe(csso()) // Minify CSS
.pipe(gulp.dest('./spritesanddice/static/wagtailadmin/css/'));
});
gulp.task('watch', function () {
gulp.watch('./spritesanddice/static/scss/userbar.scss', gulp.series('sass:userbar'));
gulp.watch('./spritesanddice/static/scss/**/*.scss', gulp.series('sass:main'));
gulp.watch('./spritesanddice/static/scss/**/*.scss', gulp.series('sass:admin'));
});