-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgulpfile.js
43 lines (38 loc) · 1.01 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
39
40
41
42
43
const gulp = require('gulp');
const sass = require('gulp-sass')(require('node-sass'));
gulp.task('sass:test', () => {
return gulp.src('./test/fixtures/*.scss')
.pipe(sass({
outputStyle: 'expanded'
}).on('error', sass.logError))
.pipe(gulp.dest('./test/fixtures/'));
});
gulp.task('sass:watch', () => {
gulp.watch(
[
'./test/fixtures/**/*.scss',
'./*.scss'
],
gulp.series('sass:test')
);
});
// PLAYGROUND
gulp.task('sass:playground', () => {
return gulp.src('./test/fixtures/-playground.scss')
.pipe(
sass({
outputStyle: 'expanded'
}).on('error', sass.logError)
)
.pipe(gulp.dest('./test/fixtures/'));
});
gulp.task('playground', () => {
gulp.watch(
[
'./test/fixtures/-playground.scss',
'./css-vars.scss'
],
gulp.series('sass:playground')
);
});
gulp.task('default', gulp.series('sass:test', 'sass:watch'));