-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathweb-ext-config.js
53 lines (50 loc) · 1.34 KB
/
web-ext-config.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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This is the web-ext configuration for the study template. It is
// part of the build system, and you should not have to modify it.
// Try to read the extension ID from the WebExtensions manifest.
let extensionID = null;
try {
const fs = require("fs");
const manifestJSON = fs.readFileSync("./manifest.json");
const manifestObj = JSON.parse(manifestJSON);
extensionID = manifestObj.browser_specific_settings.gecko.id;
}
catch(error) {
// If this block is empty, there is a linter error.
extensionID = null;
}
module.exports = {
// Global options:
verbose: true,
// Command options:
build: {
overwriteDest: true,
},
run: {
startUrl: [
extensionID !== null ? `about:devtools-toolbox?id=${extensionID}&type=extension`: "about:debugging#/runtime/this-firefox"
]
},
ignoreFiles: [
"bin",
"docs",
"scripts",
"src",
"stories",
"support",
"tests",
"copyright.txt",
"LICENSE",
"package-lock.json",
"package.json",
"rollup.config.*",
"web-ext-config.js",
"public/**/*.map",
"*.md",
"updatedSchema.schema.json",
"jsdoc-conf.json",
"jsconfig.json",
],
};