diff --git a/.gitignore b/.gitignore index dc0131f..38a717e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ .log node_modules -sidebar.js /web-ext-artifacts/ -lib/* -/yarn-error.log -/rentgen.zip +/dist/* +/yarn-error.log \ No newline at end of file diff --git a/esbuild.config.js b/esbuild.config.js index c4667dd..8a0b9da 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -44,17 +44,25 @@ let skipReactImports = { esbuild .build({ entryPoints: [ - 'components/toolbar/toolbar.tsx', - 'components/sidebar/sidebar.tsx', - 'components/report-window/report-window.tsx', - 'background.ts', - 'styles/global.scss', - 'styles/fonts.scss', + 'src/components/toolbar/toolbar.tsx', + 'src/components/sidebar/sidebar.tsx', + 'src/components/report-window/report-window.tsx', + 'src/background.ts', + 'src/styles/global.scss', + 'src/styles/fonts.scss', ], bundle: true, // minify: true, - outdir: './lib', - loader: { '.woff': 'file', '.woff2': 'file' }, + outdir: './dist', + loader: { + '.woff': 'file', + '.woff2': 'file', + '.eot': 'file', + '.ttf': 'file', + '.svg': 'file', + '.json': 'json', + '.html': 'file', + }, plugins: [scss(), skipReactImports], define: { PLUGIN_NAME: '"Rentgen"', diff --git a/manifest.json b/manifest.json index 3b4c32f..b2f5c94 100644 --- a/manifest.json +++ b/manifest.json @@ -3,11 +3,11 @@ "manifest_version": 2, "name": "Rentgen", "short_name": "Rentgen", - "version": "0.1.2", + "version": "0.1.3", "author": "Kuba Orlik, Arkadiusz Wieczorek (Internet. Czas działać!)", "homepage_url": "https://git.internet-czas-dzialac.pl/icd/rentgen", "background": { - "scripts": ["lib/background.js"] + "scripts": ["dist/background.js"] }, "commands": { "_execute_sidebar_action": { @@ -17,14 +17,14 @@ } }, "browser_action": { - "default_icon": "assets/icon-addon.svg", + "default_icon": "src/assets/icon-addon.svg", "default_title": "Rentgen", - "default_popup": "components/toolbar/toolbar.html" + "default_popup": "src/components/toolbar/toolbar.html" }, "icons": { - "16": "assets/icon-addon.svg", - "32": "assets/icon-addon.svg", - "64": "assets/icon-addon.svg" + "16": "src/assets/icon-addon.svg", + "32": "src/assets/icon-addon.svg", + "64": "src/assets/icon-addon.svg" }, "permissions": [ "proxy", diff --git a/package.json b/package.json index 419a41f..fa8de3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rentgen", - "version": "0.1.2", + "version": "0.1.3", "description": "Rentgen is an add-on prepared for Firefox based browsers. This extension will automatically visualize all the data that a given website sends to third parties.", "main": "esbuild.config.js", "type": "module", @@ -8,7 +8,7 @@ "build": "node esbuild.config.js", "watch": "node esbuild.config.js --watch", "ext-test": "web-ext run", - "create-package": "web-ext build", + "create-package": "web-ext build --overwrite-dest", "typecheck": "tsc --noEmit", "lint": "web-ext lint" }, diff --git a/assets/fonts/fira-code/ttf/FiraCode-Bold.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-Bold.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-Bold.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-Bold.ttf diff --git a/assets/fonts/fira-code/ttf/FiraCode-Light.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-Light.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-Light.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-Light.ttf diff --git a/assets/fonts/fira-code/ttf/FiraCode-Medium.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-Medium.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-Medium.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-Medium.ttf diff --git a/assets/fonts/fira-code/ttf/FiraCode-Regular.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-Regular.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-Regular.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-Regular.ttf diff --git a/assets/fonts/fira-code/ttf/FiraCode-Retina.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-Retina.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-Retina.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-Retina.ttf diff --git a/assets/fonts/fira-code/ttf/FiraCode-SemiBold.ttf b/src/assets/fonts/fira-code/ttf/FiraCode-SemiBold.ttf similarity index 100% rename from assets/fonts/fira-code/ttf/FiraCode-SemiBold.ttf rename to src/assets/fonts/fira-code/ttf/FiraCode-SemiBold.ttf diff --git a/assets/fonts/fira-code/variable_ttf/FiraCode-VF.ttf b/src/assets/fonts/fira-code/variable_ttf/FiraCode-VF.ttf similarity index 100% rename from assets/fonts/fira-code/variable_ttf/FiraCode-VF.ttf rename to src/assets/fonts/fira-code/variable_ttf/FiraCode-VF.ttf diff --git a/assets/fonts/fira-code/woff/FiraCode-Bold.woff b/src/assets/fonts/fira-code/woff/FiraCode-Bold.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-Bold.woff rename to src/assets/fonts/fira-code/woff/FiraCode-Bold.woff diff --git a/assets/fonts/fira-code/woff/FiraCode-Light.woff b/src/assets/fonts/fira-code/woff/FiraCode-Light.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-Light.woff rename to src/assets/fonts/fira-code/woff/FiraCode-Light.woff diff --git a/assets/fonts/fira-code/woff/FiraCode-Medium.woff b/src/assets/fonts/fira-code/woff/FiraCode-Medium.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-Medium.woff rename to src/assets/fonts/fira-code/woff/FiraCode-Medium.woff diff --git a/assets/fonts/fira-code/woff/FiraCode-Regular.woff b/src/assets/fonts/fira-code/woff/FiraCode-Regular.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-Regular.woff rename to src/assets/fonts/fira-code/woff/FiraCode-Regular.woff diff --git a/assets/fonts/fira-code/woff/FiraCode-SemiBold.woff b/src/assets/fonts/fira-code/woff/FiraCode-SemiBold.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-SemiBold.woff rename to src/assets/fonts/fira-code/woff/FiraCode-SemiBold.woff diff --git a/assets/fonts/fira-code/woff/FiraCode-VF.woff b/src/assets/fonts/fira-code/woff/FiraCode-VF.woff similarity index 100% rename from assets/fonts/fira-code/woff/FiraCode-VF.woff rename to src/assets/fonts/fira-code/woff/FiraCode-VF.woff diff --git a/assets/fonts/fira-code/woff2/FiraCode-Bold.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-Bold.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-Bold.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-Bold.woff2 diff --git a/assets/fonts/fira-code/woff2/FiraCode-Light.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-Light.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-Light.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-Light.woff2 diff --git a/assets/fonts/fira-code/woff2/FiraCode-Medium.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-Medium.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-Medium.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-Medium.woff2 diff --git a/assets/fonts/fira-code/woff2/FiraCode-Regular.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-Regular.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-Regular.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-Regular.woff2 diff --git a/assets/fonts/fira-code/woff2/FiraCode-SemiBold.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-SemiBold.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-SemiBold.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-SemiBold.woff2 diff --git a/assets/fonts/fira-code/woff2/FiraCode-VF.woff2 b/src/assets/fonts/fira-code/woff2/FiraCode-VF.woff2 similarity index 100% rename from assets/fonts/fira-code/woff2/FiraCode-VF.woff2 rename to src/assets/fonts/fira-code/woff2/FiraCode-VF.woff2 diff --git a/assets/fonts/open-sans/OpenSans-Bold-webfont.woff b/src/assets/fonts/open-sans/OpenSans-Bold-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-Bold-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-Bold-webfont.woff diff --git a/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff b/src/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff diff --git a/assets/fonts/open-sans/OpenSans-Italic-webfont.woff b/src/assets/fonts/open-sans/OpenSans-Italic-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-Italic-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-Italic-webfont.woff diff --git a/assets/fonts/open-sans/OpenSans-Light-webfont.woff b/src/assets/fonts/open-sans/OpenSans-Light-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-Light-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-Light-webfont.woff diff --git a/assets/fonts/open-sans/OpenSans-Regular-webfont.woff b/src/assets/fonts/open-sans/OpenSans-Regular-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-Regular-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-Regular-webfont.woff diff --git a/assets/fonts/open-sans/OpenSans-Semibold-webfont.woff b/src/assets/fonts/open-sans/OpenSans-Semibold-webfont.woff similarity index 100% rename from assets/fonts/open-sans/OpenSans-Semibold-webfont.woff rename to src/assets/fonts/open-sans/OpenSans-Semibold-webfont.woff diff --git a/assets/icon-addon-2048.png b/src/assets/icon-addon-2048.png similarity index 100% rename from assets/icon-addon-2048.png rename to src/assets/icon-addon-2048.png diff --git a/assets/icon-addon.svg b/src/assets/icon-addon.svg similarity index 100% rename from assets/icon-addon.svg rename to src/assets/icon-addon.svg diff --git a/assets/icons/bulb.svg b/src/assets/icons/bulb.svg similarity index 100% rename from assets/icons/bulb.svg rename to src/assets/icons/bulb.svg diff --git a/assets/icons/close_big.svg b/src/assets/icons/close_big.svg similarity index 100% rename from assets/icons/close_big.svg rename to src/assets/icons/close_big.svg diff --git a/assets/icons/cookie.svg b/src/assets/icons/cookie.svg similarity index 100% rename from assets/icons/cookie.svg rename to src/assets/icons/cookie.svg diff --git a/assets/icons/data.svg b/src/assets/icons/data.svg similarity index 100% rename from assets/icons/data.svg rename to src/assets/icons/data.svg diff --git a/assets/icons/file_find.svg b/src/assets/icons/file_find.svg similarity index 100% rename from assets/icons/file_find.svg rename to src/assets/icons/file_find.svg diff --git a/assets/icons/file_minus.svg b/src/assets/icons/file_minus.svg similarity index 100% rename from assets/icons/file_minus.svg rename to src/assets/icons/file_minus.svg diff --git a/assets/icons/info_circle_outline.svg b/src/assets/icons/info_circle_outline.svg similarity index 100% rename from assets/icons/info_circle_outline.svg rename to src/assets/icons/info_circle_outline.svg diff --git a/assets/icons/laptop.svg b/src/assets/icons/laptop.svg similarity index 100% rename from assets/icons/laptop.svg rename to src/assets/icons/laptop.svg diff --git a/assets/icons/mail.svg b/src/assets/icons/mail.svg similarity index 100% rename from assets/icons/mail.svg rename to src/assets/icons/mail.svg diff --git a/assets/icons/report.svg b/src/assets/icons/report.svg similarity index 100% rename from assets/icons/report.svg rename to src/assets/icons/report.svg diff --git a/assets/icons/settings.svg b/src/assets/icons/settings.svg similarity index 100% rename from assets/icons/settings.svg rename to src/assets/icons/settings.svg diff --git a/assets/icons/short_left.svg b/src/assets/icons/short_left.svg similarity index 100% rename from assets/icons/short_left.svg rename to src/assets/icons/short_left.svg diff --git a/assets/icons/trash_full.svg b/src/assets/icons/trash_full.svg similarity index 100% rename from assets/icons/trash_full.svg rename to src/assets/icons/trash_full.svg diff --git a/assets/icons/warning.svg b/src/assets/icons/warning.svg similarity index 100% rename from assets/icons/warning.svg rename to src/assets/icons/warning.svg diff --git a/assets/logo-internet-czas-dzialac.svg b/src/assets/logo-internet-czas-dzialac.svg similarity index 100% rename from assets/logo-internet-czas-dzialac.svg rename to src/assets/logo-internet-czas-dzialac.svg diff --git a/assets/screenshots/1.png b/src/assets/screenshots/1.png similarity index 100% rename from assets/screenshots/1.png rename to src/assets/screenshots/1.png diff --git a/assets/screenshots/2.png b/src/assets/screenshots/2.png similarity index 100% rename from assets/screenshots/2.png rename to src/assets/screenshots/2.png diff --git a/assets/screenshots/3a.png b/src/assets/screenshots/3a.png similarity index 100% rename from assets/screenshots/3a.png rename to src/assets/screenshots/3a.png diff --git a/assets/screenshots/3b.png b/src/assets/screenshots/3b.png similarity index 100% rename from assets/screenshots/3b.png rename to src/assets/screenshots/3b.png diff --git a/assets/screenshots/4a.png b/src/assets/screenshots/4a.png similarity index 100% rename from assets/screenshots/4a.png rename to src/assets/screenshots/4a.png diff --git a/assets/screenshots/4b.png b/src/assets/screenshots/4b.png similarity index 100% rename from assets/screenshots/4b.png rename to src/assets/screenshots/4b.png diff --git a/assets/screenshots/5a.png b/src/assets/screenshots/5a.png similarity index 100% rename from assets/screenshots/5a.png rename to src/assets/screenshots/5a.png diff --git a/assets/screenshots/5b.png b/src/assets/screenshots/5b.png similarity index 100% rename from assets/screenshots/5b.png rename to src/assets/screenshots/5b.png diff --git a/background.ts b/src/background.ts similarity index 100% rename from background.ts rename to src/background.ts diff --git a/components/report-window/deduce-problems.tsx b/src/components/report-window/deduce-problems.tsx similarity index 100% rename from components/report-window/deduce-problems.tsx rename to src/components/report-window/deduce-problems.tsx diff --git a/components/report-window/email-content.scss b/src/components/report-window/email-content.scss similarity index 100% rename from components/report-window/email-content.scss rename to src/components/report-window/email-content.scss diff --git a/components/report-window/email-content.tsx b/src/components/report-window/email-content.tsx similarity index 100% rename from components/report-window/email-content.tsx rename to src/components/report-window/email-content.tsx diff --git a/components/report-window/email-intro.tsx b/src/components/report-window/email-intro.tsx similarity index 100% rename from components/report-window/email-intro.tsx rename to src/components/report-window/email-intro.tsx diff --git a/components/report-window/explainers.tsx b/src/components/report-window/explainers.tsx similarity index 100% rename from components/report-window/explainers.tsx rename to src/components/report-window/explainers.tsx diff --git a/components/report-window/generate-survey-questions.ts b/src/components/report-window/generate-survey-questions.ts similarity index 100% rename from components/report-window/generate-survey-questions.ts rename to src/components/report-window/generate-survey-questions.ts diff --git a/components/report-window/generate-survey.ts b/src/components/report-window/generate-survey.ts similarity index 100% rename from components/report-window/generate-survey.ts rename to src/components/report-window/generate-survey.ts diff --git a/components/report-window/har-converter.tsx b/src/components/report-window/har-converter.tsx similarity index 100% rename from components/report-window/har-converter.tsx rename to src/components/report-window/har-converter.tsx diff --git a/components/report-window/parse-answers.ts b/src/components/report-window/parse-answers.ts similarity index 100% rename from components/report-window/parse-answers.ts rename to src/components/report-window/parse-answers.ts diff --git a/components/report-window/problems/no-information-at-all.tsx b/src/components/report-window/problems/no-information-at-all.tsx similarity index 100% rename from components/report-window/problems/no-information-at-all.tsx rename to src/components/report-window/problems/no-information-at-all.tsx diff --git a/components/report-window/problems/problem.tsx b/src/components/report-window/problems/problem.tsx similarity index 100% rename from components/report-window/problems/problem.tsx rename to src/components/report-window/problems/problem.tsx diff --git a/components/report-window/problems/transfer-outside-eu.tsx b/src/components/report-window/problems/transfer-outside-eu.tsx similarity index 100% rename from components/report-window/problems/transfer-outside-eu.tsx rename to src/components/report-window/problems/transfer-outside-eu.tsx diff --git a/components/report-window/problems/unknown-identity.tsx b/src/components/report-window/problems/unknown-identity.tsx similarity index 100% rename from components/report-window/problems/unknown-identity.tsx rename to src/components/report-window/problems/unknown-identity.tsx diff --git a/components/report-window/problems/unknown-legal-basis.tsx b/src/components/report-window/problems/unknown-legal-basis.tsx similarity index 100% rename from components/report-window/problems/unknown-legal-basis.tsx rename to src/components/report-window/problems/unknown-legal-basis.tsx diff --git a/components/report-window/problems/unlawful-cookies.tsx b/src/components/report-window/problems/unlawful-cookies.tsx similarity index 100% rename from components/report-window/problems/unlawful-cookies.tsx rename to src/components/report-window/problems/unlawful-cookies.tsx diff --git a/components/report-window/questions.tsx b/src/components/report-window/questions.tsx similarity index 100% rename from components/report-window/questions.tsx rename to src/components/report-window/questions.tsx diff --git a/components/report-window/raw-answers.ts b/src/components/report-window/raw-answers.ts similarity index 100% rename from components/report-window/raw-answers.ts rename to src/components/report-window/raw-answers.ts diff --git a/components/report-window/report-intro.tsx b/src/components/report-window/report-intro.tsx similarity index 100% rename from components/report-window/report-intro.tsx rename to src/components/report-window/report-intro.tsx diff --git a/components/report-window/report-window.html b/src/components/report-window/report-window.html similarity index 69% rename from components/report-window/report-window.html rename to src/components/report-window/report-window.html index d2b869e..cea5068 100644 --- a/components/report-window/report-window.html +++ b/src/components/report-window/report-window.html @@ -6,7 +6,7 @@