-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
46 lines (38 loc) · 1.21 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
44
45
46
const gulp = require('gulp');
const pug = require('gulp-pug');
const watch = require('gulp-watch');
const sass = require('gulp-sass');
sass.compiler = require('node-sass');
gulp.task('sass', function () {
return gulp.src('./_styles/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./site/css'));
});
gulp.task('pug',function() {
return gulp.src('./_views/*.pug')
.pipe(pug({
doctype: 'html',
pretty: false
}))
.pipe(gulp.dest('./site/'));
});
gulp.task('favicons', function() {
return gulp.src('./_assets/favicons/**.*')
.pipe(gulp.dest('./site/'));
});
gulp.task('img', function() {
return gulp.src('./_assets/img/**.*')
.pipe(gulp.dest('./site/img/'));
});
gulp.task('misc', function() {
return gulp.src('./_misc/**.*')
.pipe(gulp.dest('./site/'));
});
gulp.task('watch', function () {
gulp.watch('./_styles/**/*.scss', gulp.series('sass'));
gulp.watch('./_views/*.pug', gulp.series('pug'));
gulp.watch('./_assets/favicons/**.*', gulp.series('favicons'));
gulp.watch('./_assets/img/**.*', gulp.series('img'));
gulp.watch('./_misc/**.*', gulp.series('misc'));
});
gulp.task('build', gulp.parallel('pug', 'sass', 'favicons', 'img', 'misc'));