UNPKG

2.07 kBJavaScriptView Raw
1// Bring in individual Gulp configurations
2require("./config/gulp/flags");
3require("./config/gulp/sass");
4require("./config/gulp/javascript");
5require("./config/gulp/images");
6require("./config/gulp/fonts");
7require("./config/gulp/build");
8require("./config/gulp/release");
9require("./config/gulp/test");
10
11var gulp = require("gulp");
12var dutil = require("./config/gulp/doc-util");
13
14gulp.task("default", function(done) {
15 dutil.logIntroduction();
16
17 dutil.logHelp(
18 "gulp",
19 "This task will output the currently supported automation tasks. (e.g. This help message.)"
20 );
21
22 dutil.logHelp(
23 "gulp no-cleanup [ task-name ]",
24 "Prefixing tasks with `no-cleanup ` will not remove the distribution directories."
25 );
26
27 dutil.logHelp(
28 "gulp no-test [ task-name ]",
29 "Prefixing tasks with `no-test` will disable testing and linting for all supported tasks."
30 );
31
32 dutil.logCommand(
33 "gulp clean-dist",
34 "This task will remove the distribution directories."
35 );
36
37 dutil.logHelp(
38 "gulp build",
39 "This task is an alias for running `gulp sass javascript images fonts` and is the recommended task to build all assets."
40 );
41
42 dutil.logCommand(
43 "gulp sass",
44 "This task will compile all the Sass files into distribution directories."
45 );
46
47 dutil.logCommand(
48 "gulp javascript",
49 "This task will compile all the JavaScript files into distribution directories."
50 );
51
52 dutil.logCommand(
53 "gulp images",
54 "This task will copy all the image files into distribution directories."
55 );
56
57 dutil.logCommand(
58 "gulp fonts",
59 "This task will copy all the font files into distribution directories."
60 );
61
62 dutil.logCommand(
63 "gulp release",
64 "This task will run `gulp build` and prepare a release directory."
65 );
66
67 dutil.logCommand(
68 "gulp test",
69 "This task will run `gulp test` and run this repository's unit tests."
70 );
71
72 done();
73});
74
75gulp.task("watch", function() {
76 gulp.watch("src/stylesheets/**/*.scss", gulp.series("sass")),
77 gulp.watch("src/js/**/*.js", gulp.series("javascript"));
78 return;
79});