Update esbuild.config and manifest

This commit is contained in:
Arkadiusz Wieczorek 2022-01-28 11:33:44 +01:00
parent 7ec94f56cd
commit e9c5b65aa7
3 changed files with 18 additions and 18 deletions

View File

@ -2,6 +2,13 @@ import esbuild from 'esbuild';
import scss from 'esbuild-plugin-sass';
import svg from 'esbuild-plugin-svgr';
const watch = process.argv.includes('--watch') && {
onRebuild(error) {
if (error) console.error('[watch] build failed', error);
else console.log('[watch] build finished');
},
};
esbuild
.build({
entryPoints: [
@ -11,17 +18,11 @@ esbuild
'background.ts',
],
bundle: true,
minify: true,
outdir: './lib',
loader: { '.woff': 'file', '.woff2': 'file' },
plugins: [scss(), svg()],
watch: {
onRebuild(error, result) {
try {
console.log('watch build succeeded:', result);
} catch (error) {
console.error('watch build failed:', error);
}
},
},
watch,
})
.then(() => console.log('Add-on was built'))
.catch(() => process.exit(1));

View File

@ -1,22 +1,21 @@
{
"description": "Wtyczka pokazująca, jakie dane zostały ~~wykradzione~~ wysłane do podmiotów trzecich przez odwiedzane strony.",
"manifest_version": 2,
"name": "Problematyczne requesty",
"version": "1.0",
"description": "",
"homepage_url": "https://git.internet-czas-dzialac.pl/icd/problematic-requests",
"background": {
"scripts": ["lib/background.js"]
},
"sidebar_action": {
"default_title": "Problematic requests",
"default_title": "Problematyczne requesty",
"default_panel": "sidebar/sidebar.html",
"default_icon": "icons/logo-black-square.svg",
"browser_style": true,
"open_at_install": true
},
"background": {
"scripts": ["lib/background.js"]
},
"icons": {
"48": "icons/border-48.png"
"48": "icons/logo-black-square.svg"
},
"permissions": [
"proxy",

View File

@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"build": "node esbuild.config.js",
"watch": "npm run build -- --watch",
"watch": "node esbuild.config.js --watch",
"typecheck": "tsc --noEmit"
},
"repository": {