-
Notifications
You must be signed in to change notification settings - Fork 6
/
gulpfile.js
85 lines (69 loc) · 2.2 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* * * * * ==============================
* * * * * ==============================
* * * * * ==============================
* * * * * ==============================
========================================
========================================
========================================
----------------------------------------
USWDS SASS GULPFILE
----------------------------------------
*/
const gulp = require("gulp");
// const uswds = require("./node_modules/uswds-gulp/config/uswds");
/*
----------------------------------------
PATHS
----------------------------------------
- All paths are relative to the
project root
- Don't use a trailing `/` for path
names
----------------------------------------
*/
// USWDS source directory
const USWDS_SRC = "./assets/scss/uswds";
// Project JS source directory
const USWDS_JS = "./assets/js";
// Images destination
const USWDS_IMG_DEST = "./themes/brooklynrail/static/material/img/uswds";
// Fonts destination
const FONTS_DEST = "./themes/brooklynrail/static/material/fonts";
// Fontawesome
const FONTAWESOME_DEST = "./assets/vendor/fontawesome";
const FONTAWESOME_FONTS = "./themes/brooklynrail/static/material/fonts/fontawesome";
/*
----------------------------------------
TASKS
----------------------------------------
*/
gulp.task("copy-uswds-setup", () => {
return gulp
.src(`${uswds}/scss/theme/**/**`)
.pipe(gulp.dest(`${USWDS_SRC}`));
});
gulp.task("copy-uswds-js", () => {
return gulp.src(`${uswds}/js/**/**`).pipe(gulp.dest(`${USWDS_JS}`));
});
gulp.task("copy-uswds-fonts", () => {
return gulp.src(`${uswds}/fonts/**/**`).pipe(gulp.dest(`${FONTS_DEST}`));
});
gulp.task("copy-uswds-images", () => {
return gulp.src(`${uswds}/img/**/**`).pipe(gulp.dest(`${USWDS_IMG_DEST}`));
});
gulp.task("copy-fontawesome-scss", () => {
return gulp.src(`./node_modules/@fortawesome/fontawesome-free/scss/**/**`).pipe(gulp.dest(`${FONTAWESOME_DEST}`));
});
gulp.task("copy-fontawesome-fonts", () => {
return gulp.src(`./node_modules/@fortawesome/fontawesome-free/webfonts/**/**`).pipe(gulp.dest(`${FONTAWESOME_FONTS}`));
});
gulp.task(
"init",
gulp.series(
"copy-uswds-setup",
"copy-uswds-fonts",
"copy-uswds-js",
"copy-uswds-images"
)
);