Skip to content

Commit 5a410d7

Browse files
committed
Build extension (and zip)
1 parent 5874ef9 commit 5a410d7

File tree

10 files changed

+15
-38
lines changed

10 files changed

+15
-38
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lerna-debug.log*
99

1010
node_modules
1111
dist
12-
dist-ssr
12+
artifacts
1313
*.local
1414

1515
# Editor directories and files

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"dev": "vite build --watch --mode development",
1212
"start": "vite build --watch --mode production",
1313
"build": "pnpm compile && vite build --mode production",
14-
"script:build": "powershell scripts/build.ps1",
1514
"script:zip": "powershell scripts/zip.ps1"
1615
},
1716
"dependencies": {

public/128x128.png

3.61 KB
Loading

public/16x16.png

513 Bytes
Loading

public/32x32.png

928 Bytes
Loading

public/48x48.png

2.17 KB
Loading

scripts/build.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/manifest.json

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"{{chrome}}.manifest_version": 3,
3-
"{{firefox}}.manifest_version": 2,
43
"name": "Web Activity Time Tracker",
54
"short_name": "Web Tracker",
65
"version": "2.0.0",
76
"description": "Track and limit time your activity in the browser every day. Control how much time you spend on websites.",
8-
"options_page": "src/options.html",
7+
"options_page": "src/settings.html",
98
"icons": {
10-
"16": "src/icons/16x16.png",
11-
"32": "src/icons/32x32.png",
12-
"48": "src/icons/48x48.png",
13-
"128": "src/icons/128x128.png"
9+
"16": "16x16.png",
10+
"32": "32x32.png",
11+
"48": "48x48.png",
12+
"128": "128x128.png"
1413
},
1514
"permissions": [
1615
"tabs",
@@ -26,16 +25,11 @@
2625
"https://www.netflix.com/*"
2726
],
2827
"offline_enabled": true,
29-
3028
"background": {
31-
"{{chrome}}.service_worker": "src/background.ts",
32-
"{{firefox}}.scripts": ["src/background.ts"]
29+
"{{chrome}}.service_worker": "src/background.ts"
3330
},
3431
"{{chrome}}.action": {
3532
"default_popup": "src/popup.html",
3633
"default_title": "Web Activity Time Tracker"
37-
},
38-
"{{firefox}}.browser_action": {
39-
"default_popup": "src/popup.html"
4034
}
4135
}

src/popup.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Popup from './pages/Popup.vue';
2-
import { router } from './router';
32
import { createApp } from 'vue';
43

5-
createApp(Popup).use(router).mount('body');
4+
createApp(Popup).mount('body');

vite.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { defineConfig } from "vite";
2-
import vue from "@vitejs/plugin-vue";
3-
import webExtension, { readJsonFile } from "vite-plugin-web-extension";
1+
import { defineConfig } from 'vite';
2+
import vue from '@vitejs/plugin-vue';
3+
import webExtension, { readJsonFile } from 'vite-plugin-web-extension';
44
import pkg from './package.json';
55

66
const APPID_CHROME = 'hhfnghjdeddcfegfekjeihfmbjenlomm';
77

88
function generateManifest() {
9-
const manifest = readJsonFile("src/manifest.json");
10-
const pkg = readJsonFile("package.json");
9+
const manifest = readJsonFile('src/manifest.json');
10+
const pkg = readJsonFile('package.json');
1111
return {
1212
name: pkg.name,
1313
description: pkg.description,
@@ -21,7 +21,7 @@ export default defineConfig(({ mode }) => ({
2121
build: {
2222
emptyOutDir: true,
2323
sourcemap: mode === 'development' ? 'inline' : false,
24-
minify: false,
24+
minify: true,
2525
},
2626
define: {
2727
'process.env': process.env,
@@ -35,7 +35,7 @@ export default defineConfig(({ mode }) => ({
3535
vue(),
3636
webExtension({
3737
manifest: generateManifest,
38-
watchFilePaths: ["package.json", "manifest.json"],
38+
watchFilePaths: ['package.json', 'manifest.json'],
3939
}),
4040
],
4141
optimizeDeps: {

0 commit comments

Comments
 (0)