forked from mozilla/testpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
55 lines (44 loc) · 1.14 KB
/
gulpfile.babel.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
/* eslint-disable import/no-extraneous-dependencies*/
require("babel-polyfill");
// HACK: Ignore non-JS imports used for asset dependencies in Webpack
require.extensions[".scss"] = () => {};
const gulp = require("gulp");
const config = require("./frontend/config.js");
const del = require("del");
const runSequence = require("run-sequence");
require("es6-promise").polyfill();
require("isomorphic-fetch");
require("./frontend/tasks/pages");
require("./frontend/tasks/dist");
gulp.task("clean", () => del([
config.DEST_PATH,
config.DIST_PATH
]));
gulp.task("distclean", () => del([
config.DEST_PATH,
config.DIST_PATH,
"./node_modules",
"./addon/node_modules"
]));
gulp.task("build", done => runSequence(
"pages-build",
done
));
gulp.task("watch", [
"self-watch",
"pages-watch"
]);
gulp.task("default", done => runSequence(
"clean",
"build",
"watch",
done
));
// Exit if the gulpfile changes so we can self-reload with a wrapper script.
gulp.task("self-watch", () => gulp.watch([
"./gulpfile.babel.js",
"./webpack.config.js",
"./frontend/config.js",
"./debug-config.json",
"./frontend/tasks/*.js"
], () => process.exit()));