forked from uswds/uswds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
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
// Bring in individual Gulp configurations
require("./config/gulp/flags");
require("./config/gulp/sass");
require("./config/gulp/javascript");
require("./config/gulp/images");
require("./config/gulp/fonts");
require("./config/gulp/svg-sprite");
require("./config/gulp/build");
require("./config/gulp/release");
require("./config/gulp/test");
var gulp = require("gulp");
var dutil = require("./config/gulp/doc-util");
gulp.task("default", function(done) {
dutil.logIntroduction();
dutil.logHelp(
"gulp",
"This task will output the currently supported automation tasks. (e.g. This help message.)"
);
dutil.logHelp(
"gulp no-cleanup [ task-name ]",
"Prefixing tasks with `no-cleanup ` will not remove the distribution directories."
);
dutil.logHelp(
"gulp no-test [ task-name ]",
"Prefixing tasks with `no-test` will disable testing and linting for all supported tasks."
);
dutil.logCommand(
"gulp clean-dist",
"This task will remove the distribution directories."
);
dutil.logHelp(
"gulp build",
"This task is an alias for running `gulp sass javascript images fonts` and is the recommended task to build all assets."
);
dutil.logCommand(
"gulp sass",
"This task will compile all the Sass files into distribution directories."
);
dutil.logCommand(
"gulp javascript",
"This task will compile all the JavaScript files into distribution directories."
);
dutil.logCommand(
"gulp images",
"This task will copy all the image files into distribution directories."
);
dutil.logCommand(
"gulp fonts",
"This task will copy all the font files into distribution directories."
);
dutil.logCommand(
"gulp release",
"This task will run `gulp build` and prepare a release directory."
);
dutil.logCommand(
"gulp test",
"This task will run `gulp test` and run this repository's unit tests."
);
dutil.logCommand(
"gulp svg-sprite",
"This task will compile all the svg files in the usa-icons directory into an svg sprite."
);
done();
});
gulp.task("watch", function() {
gulp.watch("src/stylesheets/**/*.scss", gulp.series("sass")),
gulp.watch("src/js/**/*.js", gulp.series("javascript"));
return;
});