forked from awef/read.crx-2
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgulpfile.js
38 lines (34 loc) · 944 Bytes
/
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
const gulp = require("gulp");
const dir = require("require-dir");
const {browsers} = require("./gulp/config");
dir("./gulp");
for (let browser of browsers) {
gulp.task(`build:${browser}`, gulp.parallel(
`js:${browser}`,
`css:${browser}`,
`html:${browser}`,
`img:${browser}`,
`manifest:${browser}`,
`rules:${browser}`,
`lib:${browser}`
)
);
gulp.task(`pack:${browser}`, gulp.series(
"clean",
`build:${browser}`,
`scan:${browser}`,
`pack-in:${browser}`
)
);
gulp.task(`watch:${browser}`, gulp.series(
`build:${browser}`,
`watch-in:${browser}`
)
);
}
gulp.task("build", gulp.task("build:chrome"));
gulp.task("pack", gulp.task("pack:chrome"));
gulp.task("watch", gulp.task("watch:chrome"));
gulp.task("default", gulp.task("build"));
gulp.task("build:all", gulp.parallel("build:chrome", "build:firefox"));
gulp.task("pack:all", gulp.parallel("pack:chrome", "pack:firefox"));