forked from fvtt-fria-ligan/morkborg-foundry-vtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (34 loc) · 1.1 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
37
38
const concat = require('gulp-concat');
const gulp = require('gulp');
const prefix = require('gulp-autoprefixer');
const gsass = require('gulp-sass')(require('sass'));
// concatenate all morkborg scss into an uber morkborg.css
gulp.task('mork-sass', function () {
return gulp.src('scss/morkborg/**/*.scss')
.pipe(gsass({
outputStyle: 'expanded'
}).on('error', gsass.logError))
.pipe(prefix({
// TODO: switch to true?
cascade: false
}))
.pipe(concat('morkborg.css'))
.pipe(gulp.dest('./css'))
})
// keep tinymce skin files separate
gulp.task('skin-sass', function () {
return gulp.src('scss/skins/**/*.scss')
.pipe(gsass({
outputStyle: 'expanded'
}).on('error', gsass.logError))
.pipe(prefix({
// TODO: switch to true?
cascade: false
}))
.pipe(gulp.dest('./css/skins'))
})
gulp.task('sass', gulp.parallel('mork-sass', 'skin-sass'))
gulp.task('watch', gulp.parallel(['mork-sass', 'skin-sass'], () => {
gulp.watch('scss/morkborg/**/*.scss', gulp.series(['mork-sass']))
gulp.watch('scss/skins/**/*.scss', gulp.series(['skin-sass']))
}))