generated from chibat/chrome-extension-typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Makefile
29 lines (22 loc) · 1016 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
VERSION ?= 0.1.0
clean:
rm -rf dist
change-version:
sed -i -e "s/\"version\": \".*\"/\"version\": \"$(VERSION)\"/" src-tauri/tauri.conf.json
change-package-version:
sed -i -e "s/\"version\": \".*\"/\"version\": \"$(VERSION)\"/" package.json
build-browser-extension: change-package-version
pnpm vite build -c vite.config.chromium.ts
pnpm vite build -c vite.config.firefox.ts
cd dist/browser-extension/chromium && zip -r ../chromium.zip .
cd dist/browser-extension/firefox && zip -r ../firefox.zip .
build-userscript: change-package-version
pnpm vite build -c vite.config.userscript.ts
build-popclip-extension:
rm -f dist/openai-translator.popclipextz
mkdir -p dist/openai-translator.popclipext
cp -r clip-extensions/popclip/* dist/openai-translator.popclipext
cd dist && zip -r openai-translator.popclipextz openai-translator.popclipext && rm -r openai-translator.popclipext
build-snipdo-extension:
rm -f dist/openai-translator.pbar
zip -j -r dist/openai-translator.pbar clip-extensions/snipdo/*