forked from denschub/firefox-tabgroups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJakefile
41 lines (35 loc) · 1.06 KB
/
Jakefile
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
/* global desc, task, jake, complete */
/* vim: set fdl=0: */
"use strict";
const SRC_DIR = "./src";
const DIST_DIR = "./dist";
desc("Builds the source");
task("build", ["cleanup"], () => {
jake.cpR(SRC_DIR, DIST_DIR);
});
desc("Removes all build-related files");
task("cleanup", () => {
jake.rmRf(DIST_DIR);
});
desc("runs wslint on the built source");
task("lint", ["build"], {async: true}, () => {
jake.exec([`cd ${DIST_DIR}; eslint .`], {
interactive: true
}, complete);
});
desc("Builds the source and starts a test installation. You can specify jpm parameters with 'JPM_PARAMS=\"...\" jake run'");
task("run", ["build"], {async: true}, () => {
jake.exec([`cd ${DIST_DIR}; jpm run ${process.env.JPM_PARAMS}`], {
interactive: true
}, complete);
});
desc("Builds the source and generates a XPI");
task("xpi", ["build"], {async: true}, () => {
jake.exec([
`cd ${DIST_DIR}; jpm xpi`,
`cd ${DIST_DIR}; find . -not -name "*.xpi" -delete`
], {printStderr: true}, () => {
console.log(`.xpi was created in ${DIST_DIR}`);
complete();
});
});