-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
43 lines (33 loc) · 860 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
/*
Gulp 4
NPM Setup:
npm i gulp --global
npm i -D gulp
npm i -D gulp-nunjucks
*/
/*
This is for Eleventy Guide Nunjucks build.
*/
/* TODO: test this */
const { src, dest, series, parallel, watch } = require('gulp');
const nunjucks = require('gulp-nunjucks');
/* Functions */
const nunjucksbuild = () => {
return src('./src/*.html')
.pipe(nunjucks.compile())
.pipe(dest('./dist'));
};
const css = () => {
return src('./src/css/*.css').pipe(dest('./dist/css'));
};
const js = () => {
return src('./src/js/*.js').pipe(dest('./dist/js'));
};
const fonts = () => {
return src('./src/fonts/*.*').pipe(dest('./dist/fonts'));
};
const pagescopy = () => {
return src('./dist/**/*.*').pipe(dest('../../githubpages-02/public/eleventy-walkthrough'));
};
exports.render = series(nunjucksbuild, css, js, fonts);
exports.copy = series(pagescopy);