-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gulpfile.js
47 lines (39 loc) · 1015 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
37
38
39
40
41
42
43
44
45
46
47
var gulp = require("gulp");
var exec = require('child_process').exec;
var _sass = require("gulp-sass")(require('node-sass'));
var _del = require('del');
var watch = require('gulp-watch');
var clean = () => {
return _del(["_site/**"]);
};
var sass = () => {
return gulp.src("./sass/*.scss")
.pipe(_sass({
outputStyle: "compressed"
})
.on("error", _sass.logError))
.pipe(gulp.dest("./source/_static/css/"));
};
var eleventy = () => {
return exec('npx eleventy', (err, stdout, stderr) => {
if (err) {
console.error(err);
throw err;
}
console.log(stdout);
console.error(stderr);
});
}
var watch = () => {
var glob = [
'sass/*.scss',
'source/**/*.md'
];
return watch(glob, () => {
});
}
exports.clean = clean;
exports.sass = sass;
exports.eleventy = eleventy;
exports.watch = watch;
exports.default = gulp.series(clean, sass, eleventy);