Skip to content

Commit

Permalink
Replace license list generator (#1455)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod authored Feb 2, 2024
1 parent 39a7492 commit 0e346ee
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 387 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:
run: npm test
working-directory: packages/ui

- name: MV2 - Build Licenses
working-directory: extension-manifest-v2
run: npm run licenses

- name: MV2 - Lint
working-directory: extension-manifest-v2
run: npm run lint
Expand Down
3 changes: 1 addition & 2 deletions extension-manifest-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
"scripts": {
"postinstall": "vendor-copy && npm run download-trackerdb",
"start": "web-ext run --target=chromium",
"prebuild": "npm run licenses",
"build.dev": "webpack --mode development --progress",
"build": "webpack --mode production --progress",
"build.prod": "npm run build",
"build.watch": "webpack --mode development --progress --watch",
"licenses": "node ../tools/licenses.js",
"licenses": "license-report --config=../license-report-config.json > dist/licenses.html",
"test": "jest",
"test.watch": "jest --watch",
"test.snapshot": "jest --updateSnapshot",
Expand Down
2 changes: 1 addition & 1 deletion extension-manifest-v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "npm run build -- --watch",
"download-engines": "node scripts/download-engines/index.js",
"download-whotracksme-bloomfilter": "node scripts/download-whotracksme-bloomfilter.js",
"licenses": "node ../tools/licenses.js",
"licenses": "license-report --config=../license-report-config.json > dist/licenses.html",
"lint": "eslint src/",
"test": "npm run lint",
"locales.ui": "hybrids extract -c --format=chrome.i18n ../node_modules/@ghostery/ui ./src/_locales/en/messages.json",
Expand Down
2 changes: 1 addition & 1 deletion extension-manifest-v3/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if (manifest.declarative_net_request?.rule_resources) {
}

// generate license file
execSync('node ../tools/licenses.js', { stdio: 'inherit' });
execSync('npm run licenses', { stdio: 'inherit' });

// --- Save manifest ---

Expand Down
11 changes: 11 additions & 0 deletions license-report-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"fields": [
"name",
"author",
"installedVersion",
"licenseType",
"link"
],
"output": "html",
"only": "prod"
}
Loading

0 comments on commit 0e346ee

Please sign in to comment.