@duonghieu0712z/create-tauri-vue-template 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -3
- package/template/.github/workflows/code-quality.yml +50 -5
- package/template/.github/workflows/release.yml +75 -49
- package/template/.husky/commit-msg +3 -0
- package/template/.vscode/settings.json +1 -1
- package/template/README.md +1 -1
- package/template/commitlint.config.ts +3 -0
- package/template/package.json +20 -18
- package/template/pnpm-lock.yaml +1427 -937
- package/template/src/main.ts +0 -2
- package/template/src/styles/globals.css +18 -7
- package/template/src-tauri/Cargo.lock +58 -58
- package/template/src-tauri/Cargo.toml +2 -2
- package/template/tsconfig.node.json +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duonghieu0712z/create-tauri-vue-template",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
"picocolors": "^1.1.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@
|
|
25
|
+
"@commitlint/cli": "^21.2.0",
|
|
26
|
+
"@commitlint/config-conventional": "^21.2.0",
|
|
27
|
+
"@types/node": "^26.0.0",
|
|
26
28
|
"husky": "^9.1.7",
|
|
27
29
|
"lint-staged": "^17.0.5",
|
|
28
|
-
"oxfmt": "^0.
|
|
30
|
+
"oxfmt": "^0.56.0",
|
|
29
31
|
"oxlint": "^1.66.0",
|
|
30
32
|
"typescript": "~6.0.3"
|
|
31
33
|
},
|
|
@@ -11,12 +11,45 @@ permissions:
|
|
|
11
11
|
contents: read
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
|
+
commit-message:
|
|
15
|
+
name: Commit message
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v7
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Setup pnpm
|
|
25
|
+
uses: pnpm/action-setup@v6
|
|
26
|
+
with:
|
|
27
|
+
version: 11
|
|
28
|
+
|
|
29
|
+
- name: Setup Node.js
|
|
30
|
+
uses: actions/setup-node@v6
|
|
31
|
+
with:
|
|
32
|
+
node-version: 24
|
|
33
|
+
cache: pnpm
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: pnpm install --frozen-lockfile
|
|
37
|
+
|
|
38
|
+
- name: Lint latest commit message
|
|
39
|
+
if: github.event_name == 'push'
|
|
40
|
+
run: pnpm commitlint --from ${{ github.event.before }} --to ${{ github.sha }} --verbose
|
|
41
|
+
|
|
42
|
+
- name: Lint PR commit messages
|
|
43
|
+
if: github.event_name == 'pull_request'
|
|
44
|
+
run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
|
45
|
+
|
|
14
46
|
frontend-quality:
|
|
47
|
+
name: Frontend quality
|
|
15
48
|
runs-on: ubuntu-latest
|
|
16
49
|
|
|
17
50
|
steps:
|
|
18
51
|
- name: Checkout repository
|
|
19
|
-
uses: actions/checkout@
|
|
52
|
+
uses: actions/checkout@v7
|
|
20
53
|
|
|
21
54
|
- name: Setup pnpm
|
|
22
55
|
uses: pnpm/action-setup@v6
|
|
@@ -50,13 +83,23 @@ jobs:
|
|
|
50
83
|
run: pnpm type-check
|
|
51
84
|
|
|
52
85
|
tauri-quality:
|
|
53
|
-
|
|
86
|
+
name: Tauri quality (${{ matrix.os }})
|
|
87
|
+
runs-on: ${{ matrix.os }}
|
|
88
|
+
|
|
89
|
+
strategy:
|
|
90
|
+
fail-fast: false
|
|
91
|
+
matrix:
|
|
92
|
+
os:
|
|
93
|
+
- macos-latest
|
|
94
|
+
- ubuntu-latest
|
|
95
|
+
- windows-latest
|
|
54
96
|
|
|
55
97
|
steps:
|
|
56
98
|
- name: Checkout repository
|
|
57
|
-
uses: actions/checkout@
|
|
99
|
+
uses: actions/checkout@v7
|
|
58
100
|
|
|
59
101
|
- name: Install Linux dependencies
|
|
102
|
+
if: matrix.os == 'ubuntu-latest'
|
|
60
103
|
run: |
|
|
61
104
|
sudo apt-get update
|
|
62
105
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
@@ -73,7 +116,9 @@ jobs:
|
|
|
73
116
|
workspaces: './src-tauri -> target'
|
|
74
117
|
|
|
75
118
|
- name: Check formatting
|
|
76
|
-
|
|
119
|
+
working-directory: src-tauri
|
|
120
|
+
run: cargo +nightly fmt -- --check
|
|
77
121
|
|
|
78
122
|
- name: Check Clippy
|
|
79
|
-
|
|
123
|
+
working-directory: src-tauri
|
|
124
|
+
run: cargo +nightly clippy --all-targets --all-features -- -D warnings
|
|
@@ -11,30 +11,94 @@ concurrency:
|
|
|
11
11
|
cancel-in-progress: true
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
|
+
changelog:
|
|
15
|
+
name: Read release changelog
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
outputs:
|
|
20
|
+
body: ${{ steps.changelog.outputs.body }}
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v7
|
|
25
|
+
|
|
26
|
+
- name: Read release changelog
|
|
27
|
+
id: changelog
|
|
28
|
+
run: |
|
|
29
|
+
ruby <<'RUBY'
|
|
30
|
+
require 'json'
|
|
31
|
+
require 'securerandom'
|
|
32
|
+
|
|
33
|
+
ref = ENV.fetch('GITHUB_REF_NAME')
|
|
34
|
+
version = ref.sub(/^v/, '')
|
|
35
|
+
if version == ref
|
|
36
|
+
abort 'package.json is required to resolve the release version.' unless File.exist?('package.json')
|
|
37
|
+
version = JSON.parse(File.read('package.json')).fetch('version')
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
body = "Version #{version} release artifacts."
|
|
41
|
+
|
|
42
|
+
if File.exist?('CHANGELOG.md')
|
|
43
|
+
begin
|
|
44
|
+
content = File.read('CHANGELOG.md')
|
|
45
|
+
escaped_version = Regexp.escape(version)
|
|
46
|
+
pattern = /^##\s+(?<heading>\[?v?#{escaped_version}\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)/m
|
|
47
|
+
match = content.match(pattern)
|
|
48
|
+
|
|
49
|
+
if match && !match[:body].strip.empty?
|
|
50
|
+
anchor = match[:heading]
|
|
51
|
+
.strip
|
|
52
|
+
.downcase
|
|
53
|
+
.gsub(/[\[\].]/, '')
|
|
54
|
+
.gsub(/[^a-z0-9 _-]/, '')
|
|
55
|
+
.gsub(/\s+/, '-')
|
|
56
|
+
changelog_url = "#{ENV.fetch('GITHUB_SERVER_URL')}/#{ENV.fetch('GITHUB_REPOSITORY')}/blob/#{ref}/CHANGELOG.md##{anchor}"
|
|
57
|
+
body = "#{match[:body].strip}\n\n[See full changelog](#{changelog_url})"
|
|
58
|
+
end
|
|
59
|
+
rescue StandardError
|
|
60
|
+
warn 'Failed to read release changelog. Using fallback release body.'
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
delimiter = SecureRandom.uuid
|
|
65
|
+
File.open(ENV.fetch('GITHUB_OUTPUT'), 'a') do |output|
|
|
66
|
+
output.puts "body<<#{delimiter}"
|
|
67
|
+
output.puts body
|
|
68
|
+
output.puts delimiter
|
|
69
|
+
end
|
|
70
|
+
RUBY
|
|
71
|
+
|
|
14
72
|
build:
|
|
73
|
+
name: Build release (${{ matrix.label }})
|
|
74
|
+
needs: changelog
|
|
15
75
|
permissions:
|
|
16
76
|
contents: write
|
|
77
|
+
runs-on: ${{ matrix.os }}
|
|
78
|
+
|
|
17
79
|
strategy:
|
|
18
80
|
fail-fast: false
|
|
19
81
|
matrix:
|
|
20
82
|
include:
|
|
21
|
-
-
|
|
83
|
+
- os: macos-latest
|
|
84
|
+
label: macos-aarch64
|
|
22
85
|
args: --target aarch64-apple-darwin
|
|
23
|
-
-
|
|
86
|
+
- os: macos-latest
|
|
87
|
+
label: macos-x86_64
|
|
24
88
|
args: --target x86_64-apple-darwin
|
|
25
|
-
-
|
|
89
|
+
- os: ubuntu-latest
|
|
90
|
+
label: ubuntu
|
|
26
91
|
args: ''
|
|
27
|
-
-
|
|
92
|
+
- os: windows-latest
|
|
93
|
+
label: windows
|
|
28
94
|
args: ''
|
|
29
95
|
|
|
30
|
-
runs-on: ${{ matrix.platform }}
|
|
31
|
-
|
|
32
96
|
steps:
|
|
33
97
|
- name: Checkout repository
|
|
34
|
-
uses: actions/checkout@
|
|
98
|
+
uses: actions/checkout@v7
|
|
35
99
|
|
|
36
100
|
- name: Install Linux dependencies
|
|
37
|
-
if: matrix.
|
|
101
|
+
if: matrix.os == 'ubuntu-latest'
|
|
38
102
|
run: |
|
|
39
103
|
sudo apt-get update
|
|
40
104
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
@@ -53,7 +117,7 @@ jobs:
|
|
|
53
117
|
- name: Setup Rust
|
|
54
118
|
uses: dtolnay/rust-toolchain@stable
|
|
55
119
|
with:
|
|
56
|
-
targets: ${{ matrix.
|
|
120
|
+
targets: ${{ matrix.os == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
|
57
121
|
|
|
58
122
|
- name: Rust cache
|
|
59
123
|
uses: swatinem/rust-cache@v2
|
|
@@ -63,52 +127,14 @@ jobs:
|
|
|
63
127
|
- name: Install frontend dependencies
|
|
64
128
|
run: pnpm install --frozen-lockfile
|
|
65
129
|
|
|
66
|
-
- name: Read release changelog
|
|
67
|
-
id: changelog
|
|
68
|
-
shell: pwsh
|
|
69
|
-
run: |
|
|
70
|
-
$version = $env:GITHUB_REF_NAME -replace '^v', ''
|
|
71
|
-
if ($version -eq $env:GITHUB_REF_NAME) {
|
|
72
|
-
$version = node -p "require('./package.json').version"
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
$body = "Version $version release artifacts."
|
|
76
|
-
|
|
77
|
-
if (Test-Path -LiteralPath CHANGELOG.md) {
|
|
78
|
-
try {
|
|
79
|
-
$content = Get-Content CHANGELOG.md -Raw -ErrorAction Stop
|
|
80
|
-
$escapedVersion = [regex]::Escape($version)
|
|
81
|
-
$pattern = "(?ms)^##\s+(?<heading>\[?v?$escapedVersion\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)"
|
|
82
|
-
$match = [regex]::Match($content, $pattern)
|
|
83
|
-
|
|
84
|
-
if ($match.Success -and ![string]::IsNullOrWhiteSpace($match.Groups["body"].Value)) {
|
|
85
|
-
$ref = $env:GITHUB_REF_NAME
|
|
86
|
-
$anchor = $match.Groups["heading"].Value.Trim().ToLowerInvariant()
|
|
87
|
-
$anchor = $anchor -replace '[\[\]\.]', ''
|
|
88
|
-
$anchor = $anchor -replace '[^a-z0-9 _-]', ''
|
|
89
|
-
$anchor = $anchor -replace '\s+', '-'
|
|
90
|
-
$changelogUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/blob/$ref/CHANGELOG.md#$anchor"
|
|
91
|
-
$body = $match.Groups["body"].Value.Trim() + "`n`n[See full changelog]($changelogUrl)"
|
|
92
|
-
}
|
|
93
|
-
} catch {
|
|
94
|
-
Write-Warning "Failed to read release changelog. Using fallback release body."
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
$delimiter = [guid]::NewGuid().ToString()
|
|
99
|
-
|
|
100
|
-
"body<<$delimiter" >> $env:GITHUB_OUTPUT
|
|
101
|
-
$body >> $env:GITHUB_OUTPUT
|
|
102
|
-
$delimiter >> $env:GITHUB_OUTPUT
|
|
103
|
-
|
|
104
130
|
- name: Build and upload release
|
|
105
131
|
uses: tauri-apps/tauri-action@v0
|
|
106
132
|
env:
|
|
107
133
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
108
134
|
with:
|
|
109
135
|
tagName: v__VERSION__
|
|
110
|
-
releaseName:
|
|
111
|
-
releaseBody: ${{
|
|
136
|
+
releaseName: v__VERSION__
|
|
137
|
+
releaseBody: ${{ needs.changelog.outputs.body }}
|
|
112
138
|
releaseDraft: true
|
|
113
139
|
prerelease: false
|
|
114
140
|
args: ${{ matrix.args }}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"explorer.fileNesting.patterns": {
|
|
4
4
|
"tsconfig.json": "tsconfig.*.json, env.d.ts, typed-router.d.ts",
|
|
5
5
|
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
|
6
|
-
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .oxfmt*, .prettier*, prettier*, .lintstagedrc*, lint-staged*, .editorconfig"
|
|
6
|
+
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .oxfmt*, .prettier*, prettier*, .lintstagedrc*, lint-staged*, commitlint*, .editorconfig"
|
|
7
7
|
},
|
|
8
8
|
"editor.codeActionsOnSave": {
|
|
9
9
|
"source.fixAll": "explicit"
|
package/template/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Setup
|
|
4
4
|
|
|
5
|
-
Install Node.js, pnpm, Rust, and the Tauri system dependencies for your operating system. This project requires Node.js
|
|
5
|
+
Install Node.js, pnpm, Rust, and the Tauri system dependencies for your operating system. This project requires Node.js `>=22.12.0`.
|
|
6
6
|
|
|
7
7
|
On Ubuntu/Debian, install the Tauri Linux dependencies:
|
|
8
8
|
|
package/template/package.json
CHANGED
|
@@ -24,42 +24,44 @@
|
|
|
24
24
|
"prepare": "husky"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@lucide/vue": "^1.
|
|
28
|
-
"@tauri-apps/api": "^2.11.
|
|
27
|
+
"@lucide/vue": "^1.22.0",
|
|
28
|
+
"@tauri-apps/api": "^2.11.1",
|
|
29
29
|
"class-variance-authority": "^0.7.1",
|
|
30
30
|
"clsx": "^2.1.1",
|
|
31
31
|
"tailwind-merge": "^3.6.0",
|
|
32
|
-
"vue": "^3.5.
|
|
32
|
+
"vue": "^3.5.39"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
35
|
+
"@commitlint/cli": "^21.2.0",
|
|
36
|
+
"@commitlint/config-conventional": "^21.2.0",
|
|
37
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
38
|
+
"@tauri-apps/cli": "^2.11.4",
|
|
37
39
|
"@tsconfig/node24": "^24.0.4",
|
|
38
|
-
"@types/node": "^
|
|
40
|
+
"@types/node": "^26.0.1",
|
|
39
41
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
40
42
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
41
|
-
"@vue/eslint-config-typescript": "^14.
|
|
43
|
+
"@vue/eslint-config-typescript": "^14.9.0",
|
|
42
44
|
"@vue/tsconfig": "^0.9.1",
|
|
43
|
-
"eslint": "^10.
|
|
44
|
-
"eslint-plugin-oxlint": "^1.
|
|
45
|
+
"eslint": "^10.6.0",
|
|
46
|
+
"eslint-plugin-oxlint": "^1.71.0",
|
|
45
47
|
"eslint-plugin-vue": "^10.9.2",
|
|
46
48
|
"husky": "^9.1.7",
|
|
47
49
|
"jiti": "^2.7.0",
|
|
48
|
-
"lint-staged": "^17.0.
|
|
49
|
-
"npm-run-all2": "^9.0.
|
|
50
|
-
"oxfmt": "^0.
|
|
51
|
-
"oxlint": "^1.
|
|
50
|
+
"lint-staged": "^17.0.8",
|
|
51
|
+
"npm-run-all2": "^9.0.2",
|
|
52
|
+
"oxfmt": "^0.56.0",
|
|
53
|
+
"oxlint": "^1.71.0",
|
|
52
54
|
"picomatch": "^4.0.4",
|
|
53
|
-
"tailwindcss": "^4.3.
|
|
55
|
+
"tailwindcss": "^4.3.1",
|
|
54
56
|
"tw-animate-css": "^1.4.0",
|
|
55
57
|
"typescript": "~6.0.3",
|
|
56
58
|
"unplugin-auto-import": "^21.0.0",
|
|
57
59
|
"unplugin-vue-components": "^32.1.0",
|
|
58
|
-
"vite": "^8.0
|
|
59
|
-
"vite-plugin-vue-devtools": "^8.1.
|
|
60
|
-
"vue-tsc": "^3.3.
|
|
60
|
+
"vite": "^8.1.0",
|
|
61
|
+
"vite-plugin-vue-devtools": "^8.1.5",
|
|
62
|
+
"vue-tsc": "^3.3.5"
|
|
61
63
|
},
|
|
62
64
|
"engines": {
|
|
63
|
-
"node": "
|
|
65
|
+
"node": ">=22.12.0"
|
|
64
66
|
}
|
|
65
67
|
}
|