-
Notifications
You must be signed in to change notification settings - Fork 103
/
gulpfile.js
44 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
const { src, dest, series, parallel, watch } = require("gulp");
const uswds = require("@uswds/compile");
uswds.settings.version = 3;
uswds.paths.src.projectSass = "./site/_sass";
uswds.paths.dist.img = "./site/assets/uswds/img";
uswds.paths.dist.fonts = "./site/assets/uswds/fonts";
uswds.paths.dist.js = "./site/assets/uswds/js";
uswds.paths.dist.css = "./site/assets/css";
uswds.paths.dist.theme = "./site/_sass";
const WEBFONTS_SRC = "./fonts/webfonts";
const WEBFONTS_DEST = "./site/assets/fonts";
function copyWebfonts() {
return src(`${WEBFONTS_SRC}/**/**`, {
encoding: false,
}).pipe(dest(WEBFONTS_DEST));
}
function watchWebfonts() {
return watch(`${WEBFONTS_SRC}/**/*`, copyWebfonts);
};
exports.watch = series(
copyWebfonts,
uswds.compile,
parallel(
uswds.watch,
watchWebfonts
)
);
exports.compileIcons = uswds.compileIcons;
exports.copyWebfonts = copyWebfonts;
exports.copyFonts = uswds.copyFonts;
exports.copyImages = uswds.copyImages;
exports.copyJS = uswds.copyJS;
exports.copyTheme = uswds.copyTheme;
exports.copyAssets = uswds.copyAssets;
exports.update = series(uswds.copyImages, uswds.copyJS);
exports.buildSass = uswds.compile;
exports.watchSass = uswds.watch;
exports.default = this.watch;