Skip to content

Commit 9332570

Browse files
committed
scripts and readme updates
1 parent 2126758 commit 9332570

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,9 @@ features:
2323

2424
### chrome/edge
2525

26-
1. clone/download this repo.
27-
2. run `npm i` (you must have node.js).
28-
3. run `npm run build:chrome`. you should see it create a `dist` folder.
29-
6. go to the chrome extensions manager (`chrome://extensions`).
30-
7. turn on developer mode in the top right.
31-
8. click "Load unpacked" in the top left.
32-
9. select the `dist` folder.
33-
34-
### development / building from source
35-
36-
1. clone/download this repo.
37-
2. run `npm i` (you must have node.js).
38-
3. run `npm run dev` to start in development mode. the page will run at `http://localhost:5173`.
39-
4. run `npm run build` to build for production.
26+
1. go to <https://chromewebstore.google.com/detail/re-start/fdodcmjeojbmcgmhcgcelffcekhicnop>.
27+
2. click "Add to [Browser]".
28+
3. make sure to click "Add extension" and "Keep it" when prompted.
4029

4130
## usage tips
4231

@@ -46,3 +35,11 @@ features:
4635
- you can force a refresh of the weather and todoist widgets by clicking the top left panel labels.
4736
- the ping stat is based on how long a request to <https://www.google.com/generate_204> takes. don't take it too seriously.
4837
- here's a matching [firefox color theme](https://color.firefox.com/?theme=XQAAAAK3BAAAAAAAAABBqYhm849SCicxcUhA3DJozHnOMuotJJDtxcajvY2nrbwtWf53IW6FuMhmsQBmHjQtYV0LyoGIJnESUiSA8WGCMfXU1SYqmE_CaU8iA8bQXAYc2jrXIT6bjoi8T-cSTCi2_9o7kcESfauVKnMZKEKJIeeuT9qsP4Z_T2ya4LBqvZWjm1-pHOmWMq1OU0wrgs4bkzHQWozn4dcm22eBmWyWR55FkcmEsPvvHzhHCZ2ZMQrPXQqrOBLr79GTkJUGa5oslhWTp2LYqdD2gNQ1a8_c5-F91bPVmQerXZWpp-OZ11D1Ai6t1ydqjbVKD3RrGXYJwhcQaAxCKa_ft4VoGrVBq8AXYeJOZdXuOxnYXGhOXXSK_NybBfJLm-2W28qSSdoiW0pTL-iFan3xQQeC0WlSrnRYrRjh7HkgLuI-Ft8Fq5kNC7nVXoo8j9Ml_q2AO_RhE116j_MECbspxaJP58juayX_wNty3V2g5zUsf0gSqpEWGT02oZAF2z6LABKRWTO28wIoMUDvj9WAQGsup95WAmNW7g4WMEIgaiJhmBz9koq0wV7gHQtJB_0x2lJ7WQ488bJi8LvqnW-VT3kZ3GJtyv-yXmRJ)!
38+
39+
## development / build from source
40+
41+
1. clone this repo.
42+
2. run `npm i` (you must have node.js).
43+
3. run `npm run dev` to run the page in dev mode at `http://localhost:5173`.
44+
4. run `npm run watch` to build the extension and watch for changes. this can be used with `web-ext run` to test in firefox.
45+
5. run `npm run build:firefox` or `npm run build:chrome` to build for production. the built extension will output to `dist/firefox` or `dist/chrome` respectively.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "npm run build:firefox",
9-
"build:firefox": "vite build && node scripts/build-manifest.js firefox",
10-
"build:chrome": "vite build && node scripts/build-manifest.js chrome",
8+
"build": "vite build --outDir dist/firefox",
9+
"build:firefox": "vite build --outDir dist/firefox",
10+
"build:chrome": "vite build --outDir dist/chrome && node scripts/build-manifest.js chrome dist/chrome",
11+
"watch": "vite build --outDir dist/firefox --watch",
1112
"preview": "vite preview"
1213
},
1314
"devDependencies": {

scripts/build-manifest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import fs from 'fs'
22
import path from 'path'
33

44
const browser = process.argv[2] || 'firefox'
5+
const distPath = process.argv[3] || './dist'
56
const manifestPath = './public/manifest.json'
6-
const distPath = './dist'
77

88
// Read the source manifest
99
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'))

0 commit comments

Comments
 (0)