-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (25 loc) · 822 Bytes
/
gulpfile.js
File metadata and controls
31 lines (25 loc) · 822 Bytes
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
const gulp = require('gulp');
const pug = require('gulp-pug');
const sass = require('gulp-sass');
function views () {
return gulp.src(['views/*.pug', 'extras/*.pug', 'synopsis/*.pug', '!**/_*.pug'])
.pipe(pug())
.pipe(gulp.dest('html/'));
}
function index () {
return gulp.src(['index.pug'])
.pipe(pug())
.pipe(gulp.dest('./'));
}
function styles () {
return gulp.src(['sass/*.sass', '!**/_*.sass', '!**/_*.scss'])
.pipe(sass())
.pipe(gulp.dest('css/'));
}
function watchViews () {
return gulp.watch(['**/*.pug', '**/*.sql'], {delay: 100}, gulp.parallel(views, index));
}
function watchStyles () {
return gulp.watch(['**/*.sass', '**/*.scss'], {delay: 100}, styles);
}
exports.default = gulp.parallel(views, index, styles, watchViews, watchStyles);