-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (25 loc) · 916 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
const { watch, series, parallel, task } = require('gulp');
const { script, sass, copy, pug, clean } = require('codemonauts-gulp-tasks');
const tailwindcss = require('tailwindcss');
task('sass', function () {
extras = [tailwindcss('./tailwind.config.js')]
return sass(['src/sass/*.sass'], 'src/sass/', 'opensplit/static/css', extras);
});
task('js', function () {
return script('src/js/script.js', 'opensplit/static/js')
})
task('img', function () {
return copy('src/img/*', 'opensplit/static/img')
})
task('clean', function () {
return clean([
'opensplit/static/css/**/*',
]);
});
task('watch', function () {
watch(['src/sass/*', 'tailwind.config.js'], series('sass'));
watch(['src/js/*'], series('js'));
watch(['src/img/*'], series('img'));
});
task('build', series('clean', parallel('sass', 'js', 'img')));
task('default', series('clean', 'build', 'watch'));