Skip to content

Commit

Permalink
Upgrade to Tauri v2. Fix issues of variables in pages may be `undefin…
Browse files Browse the repository at this point in the history
…ed`.

- 升级到 Tauri v2
- 升级依赖项 toml_edit、notify-debouncer-full、rusqlite、notify
- 由于 vue lifecycle hooks 不会等待 async 函数执行完成,变量可能未初始化完毕,使用 v-if 解决此问题
  • Loading branch information
zhb2000 committed Jan 3, 2025
1 parent dce44b4 commit 46b81c5
Show file tree
Hide file tree
Showing 24 changed files with 6,983 additions and 1,222 deletions.
3 changes: 2 additions & 1 deletion build-for-windows.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
/** Build portable zip and bundle installer for Windows. */

import { spawn } from 'child_process';
Expand Down Expand Up @@ -126,7 +127,7 @@ async function main() {
const packageName = packageJson.name;
const tauriJson = JSON.parse(await fsp.readFile(path.join(__dirname, 'src-tauri/tauri.conf.json'), 'utf8'));
/** @type {string} */
const productName = tauriJson.package.productName;
const productName = tauriJson.productName;
const portableName = `${packageName}_${version}_windows_x64-portable`;

if (!skipBuild) {
Expand Down
180 changes: 111 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "anki-marker",
"private": true,
"version": "0.1.0",
"version": "0.1.1-0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -10,7 +10,12 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.5.6",
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/plugin-clipboard-manager": "^2.2.0",
"@tauri-apps/plugin-dialog": "^2.2.0",
"@tauri-apps/plugin-http": "^2.2.0",
"@tauri-apps/plugin-os": "^2.2.0",
"@tauri-apps/plugin-shell": "^2.2.0",
"element-plus": "^2.9.1",
"github-markdown-css": "^5.8.1",
"markdown-it": "^14.1.0",
Expand All @@ -20,7 +25,7 @@
"vue-router": "^4.4.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.5.14",
"@tauri-apps/cli": "^2.0.0",
"@types/markdown-it": "^14.1.2",
"@types/semver": "^7.5.8",
"@vitejs/plugin-vue": "^5.0.5",
Expand Down
Loading

0 comments on commit 46b81c5

Please sign in to comment.