Skip to content

Commit

Permalink
refactor: remove unnecessary extension pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ajyey committed Jul 1, 2023
1 parent 716fd45 commit 0da8021
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 173 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "masked-email-manager",
"displayName": "Fastmail Masked Email Manager",
"displayName": "Masked Email Manager",
"description": "A web extension to manage your Fastmail masked emails",
"version": "1.0.0-beta.34",
"description": "A web extension to manage your fastmail masked emails",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
8 changes: 0 additions & 8 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const manifest: Manifest.WebExtensionManifest = {
options_ui: {
page: 'src/pages/options/index.html'
},
background: {
service_worker: 'src/pages/background/index.js',
type: 'module'
},
action: {
default_popup: 'src/pages/popup/index.html',
default_icon: 'icon34.png'
Expand All @@ -23,7 +19,6 @@ const manifest: Manifest.WebExtensionManifest = {
'128': 'icon128.png'
},
permissions: ['storage', 'tabs'],
devtools_page: 'src/pages/devtools/index.html',
web_accessible_resources: [
{
resources: [
Expand All @@ -41,9 +36,6 @@ const isFirefox = process.env.BROWSER === 'firefox';
// Firefox does not support background.service_worker, so convert to the firefox compatible background.scripts
if (isFirefox) {
const extensionId = 'c48d361c-1173-11ee-be56-0242ac120002';
manifest.background = {
scripts: ['src/pages/background/index.js']
};
manifest.browser_specific_settings = {
gecko: {
id: `{${extensionId}}`
Expand Down
Empty file removed src/pages/background/index.ts
Empty file.
10 changes: 0 additions & 10 deletions src/pages/devtools/index.html

This file was deleted.

5 changes: 0 additions & 5 deletions src/pages/devtools/index.ts

This file was deleted.

38 changes: 0 additions & 38 deletions src/pages/newtab/Newtab.css

This file was deleted.

24 changes: 0 additions & 24 deletions src/pages/newtab/Newtab.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/pages/newtab/index.css

This file was deleted.

12 changes: 0 additions & 12 deletions src/pages/newtab/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions src/pages/newtab/index.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/pages/panel/Panel.css

This file was deleted.

10 changes: 0 additions & 10 deletions src/pages/panel/Panel.tsx

This file was deleted.

Empty file removed src/pages/panel/index.css
Empty file.
12 changes: 0 additions & 12 deletions src/pages/panel/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions src/pages/panel/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/pages/popup/components/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export default function HomeComponent({ onLogout }: HomeComponentProps) {
active: true,
lastFocusedWindow: true
});

// Check if tabs exist
if (tabs.length > 0) {
const activeTabUrl = tabs[0].url;
Expand Down
7 changes: 2 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { resolve } from 'path';
import { defineConfig } from 'vite';

import { outputFolderName } from './utils/constants/constants';
import makeManifest from './utils/plugins/make-manifest';

const isFirefox = process.env.BROWSER === 'firefox';
const firefoxOutDir = resolve(__dirname, 'dist-firefox');
import makeManifest from './utils/plugins/make-manifest';

const root = resolve(__dirname, 'src');
const pagesDir = resolve(root, 'pages');
Expand All @@ -29,11 +30,7 @@ export default defineConfig({
emptyOutDir: false,
rollupOptions: {
input: {
devtools: resolve(pagesDir, 'devtools', 'index.html'),
panel: resolve(pagesDir, 'panel', 'index.html'),
background: resolve(pagesDir, 'background', 'index.ts'),
popup: resolve(pagesDir, 'popup', 'index.html'),
newtab: resolve(pagesDir, 'newtab', 'index.html'),
options: resolve(pagesDir, 'options', 'index.html')
},
output: {
Expand Down

0 comments on commit 0da8021

Please sign in to comment.