Repository navigation
Expand file tree
/
Copy pathgulpfile.js
More file actions
71 lines (57 loc) · 2.37 KB
/
Copy pathgulpfile.js
File metadata and controls
71 lines (57 loc) · 2.37 KB
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
const gulp = require('gulp');
// Require GulpWP and pass your local `gulp` instance to it
const gulpWP = require('gulp-wp')(gulp);
/**
* Alter default task to omit POT generation step.
* DEFAULT: gulp.task('default', gulp.parallel('compile-sass', 'compile-js', 'generate-pot'));
*/
// gulp.task('default', gulp.parallel('compile-sass', 'compile-js'));
/**
* Copy assets from node_modules.
* Run: gulp upboot
*
* Does the following:
* 1. Copies files from bootstrap4-theme to various places within /src
* 2. Copies files from component-cookie-consent to /src
* 3. Copies files from component-header to /src
* 4. Copies files from component-footer to /src
*
*/
gulp.task("upboot", function (done) {
var paths = {
"node": "./node_modules",
"dev": "./src",
}
/** ----------------------------------------------------------
Part 1. Assembling the assets for UDS Bootstrap design kit.
------------------------------------------------------------- */
// Copy UDS SCSS files from the node /src folder.
gulp
.src(paths.node + "/@asu/unity-bootstrap-theme/src/scss/**/*.scss")
.pipe(gulp.dest(paths.dev + "/unity-bootstrap-theme"));
// Compiling the Unity Design kit source requires the orig Bootstrap files to be present at /bootstrap/sass.
gulp
.src(paths.node + "/bootstrap/scss/**/*.*")
.pipe(gulp.dest(paths.dev + "/unity-bootstrap-theme/bootstrap/scss"));
// Copy UDS image files to /img at root level.
// Accomodates default setting for image paths from shipped Bootstrap CSS.
gulp
.src(paths.node + "/@asu/unity-bootstrap-theme/dist/img/**/*")
.pipe(gulp.dest(paths.dev + "/unity-bootstrap-theme/img"));
// Copy distributed JS packages from Bootstrap (co-located within the ASU Bootstrap-4 theme).
gulp
.src(paths.node + "/@asu/unity-bootstrap-theme/dist/js/*.js")
.pipe(gulp.dest(paths.dev + "/unity-bootstrap-theme/js"));
/** ----------------------------------------------------------
Part 2. Copy additional asu package assets for use within the theme.
------------------------------------------------------------- */
// UDS component-header-footer JS files
gulp
.src(paths.node + "/@asu/component-header-footer/dist/**/*")
.pipe(gulp.dest(paths.dev + "/component-header-footer/"));
// UDS component-footer JS files
// gulp
// .src(paths.node + "/@asu/component-footer/dist/**/*")
// .pipe(gulp.dest(paths.dev + "/component-footer/js"));
done();
});