Skip to content

Commit

Permalink
feat: 打包发布到 git
Browse files Browse the repository at this point in the history
  • Loading branch information
027xiguapi committed Nov 30, 2023
1 parent d9b4d75 commit 52ab341
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
4 changes: 4 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @pear-rec/desktop

## 1.2.11

feat: 打包发布到 git

## 1.2.10

perf: 设置保存地址
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop/electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
deleteAppDataOnUninstall: false,
},
publish: {
provider: 'generic',
channel: 'latest',
url: 'https://github.com/027xiguapi/pear-rec/releases/download/v1.1.9',
provider: 'github',
repo: 'pear-rec',
owner: '027xiguapi',
},
}
9 changes: 5 additions & 4 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pear-rec/desktop",
"version": "1.2.10",
"version": "1.2.11",
"main": "dist-electron/main/index.js",
"description": "pear-rec",
"author": {
Expand All @@ -20,7 +20,8 @@
"build:win": "electron-builder",
"preview": "vite preview",
"pree2e": "vite build --mode=test",
"e2e": "playwright test"
"e2e": "playwright test",
"release": "electron-builder -p always"
},
"dependencies": {
"electron-updater": "^6.1.1",
Expand All @@ -35,7 +36,7 @@
"@vitejs/plugin-react": "^4.0.4",
"autoprefixer": "^10.4.16",
"electron": "^26.0.0",
"electron-builder": "^24.6.3",
"electron-builder": "^24.9.1",
"jsonfile": "^6.1.0",
"typescript": "^5.2.2",
"uuid": "^9.0.1",
Expand All @@ -46,4 +47,4 @@
"engines": {
"node": "^14.18.0 || >=16.0.0"
}
}
}
21 changes: 10 additions & 11 deletions packages/web/src/pages/main.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { createRoot } from "react-dom/client";
import { initI18n } from "../i18n";
import "./index.scss";
import { createRoot } from 'react-dom/client';
import { initI18n } from '../i18n';
import './index.scss';

export default function initApp(App) {
const userAgent = navigator.userAgent.toLowerCase();
window.isElectron = userAgent.indexOf(" electron/") > -1 ? true : false;
window.isOffline =
location.host == "pear-rec-xiguapi.vercel.app" ? true : false;
const container = document.getElementById("root") as HTMLElement;
const root = createRoot(container);
initI18n();
root.render(<App />);
const userAgent = navigator.userAgent.toLowerCase();
window.isElectron = userAgent.indexOf(' electron/') > -1 ? true : false;
window.isOffline = location.host == 'pear-rec-xiguapi.vercel.app' ? true : false;
const container = document.getElementById('root') as HTMLElement;
const root = createRoot(container);
initI18n();
root.render(<App />);
}

0 comments on commit 52ab341

Please sign in to comment.