forked from mozilla/side-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
54 lines (54 loc) · 2.99 KB
/
package.json
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
{
"name": "side-view",
"description": "Open a mobile view of a page in the sidebar",
"version": "0.4.0",
"author": "Mozilla (https://mozilla.org/)",
"bugs": {
"url": "https://github.com/mozilla/side-view/issues"
},
"dependencies": {
"shield-studies-addon-utils": "^5.0.3"
},
"devDependencies": {
"addons-linter": "^1.3.2",
"eslint": "^5.5.0",
"eslint-plugin-mozilla": "^0.15.4",
"eslint-plugin-no-unsanitized": "^3.0.2",
"mustache": "^2.3.2",
"npm-run-all": "^4.1.3",
"stylelint": "^9.5.0",
"stylelint-config-standard": "^18.2.0",
"testpilot-ga": "^0.3.0",
"web-ext": "^2.9.1"
},
"homepage": "https://github.com/mozilla/side-view/",
"license": "MPL-2.0",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/mozilla/side-view.git"
},
"scripts": {
"start": "npm-run-all build run",
"start-amo": "npm-run-all build-amo run",
"lint": "npm-run-all lint:*",
"lint:addon": "npm run package && addons-linter ./addon.xpi -o text --self-hosted",
"lint:js": "eslint .",
"lint:styles": "stylelint ./addon/*.css",
"build": "npm-run-all build:*",
"build:ga": "mkdir -p addon/build && cp $(node -e 'console.log(require.resolve(\"testpilot-ga\"))') addon/build/testpilot-ga.js",
"build:testutils": "if [[ -n \"$SHIELD\" ]] ; then copyStudyUtils ./addon/experiment/ ; else rm -rf ./addon/experiment/study/ ; fi",
"build:manifest": "node -e 'let input = JSON.parse(fs.readFileSync(\"package.json\")); input.version = input.version.slice(0, -1) + Math.floor((Date.now() - new Date(new Date().getFullYear().toString()).getTime()) / 3600000); Object.assign(input, process.env); input.SHIELD_OR_AMO = input.SHIELD || input.IS_AMO ; console.log(JSON.stringify(input))' | mustache - addon/manifest.json.tmpl > addon/manifest.json",
"build:buildSettings": "node -e 'console.log(JSON.stringify(process.env))' | mustache - addon/buildSettings.js.tmpl > addon/build/buildSettings.js",
"build:web-ext": "web-ext build --source-dir=addon --overwrite-dest --ignore-files '*.tmpl'",
"build-amo": "npm-run-all build-amo:*",
"build-amo:buildSettings": "IS_AMO=1 npm-run-all build:buildSettings build:manifest",
"build-amo:web-ext": "web-ext build --source-dir=addon --overwrite-dest --ignore-files '*.tmpl' --ignore-files 'build/testpilot-ga.js'",
"build-null": "copyStudyUtils ./null-addon/addon/experiment/ && web-ext build --source-dir=null-addon/addon/ --overwrite-dest",
"package": "npm run build && cp web-ext-artifacts/`ls -t1 web-ext-artifacts | head -n 1` addon.xpi",
"package-amo": "npm run build-amo && cp web-ext-artifacts/`ls -t1 web-ext-artifacts | head -n 1` addon-amo.xpi",
"package-null": "npm run build-null && cp web-ext-artifacts/`ls -t1 web-ext-artifacts | head -n 1` addon-null.xpi",
"run": "mkdir -p ./Profile && web-ext run --source-dir=addon -p ./Profile --browser-console --keep-profile-changes -f nightly --pref=shieldStudy.logLevel=All",
"test": "npm run lint"
}
}