@duonghieu0712z/create-tauri-vue-template 0.0.3
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/LICENSE +21 -0
- package/README.md +74 -0
- package/assets/vscode-settings.json +16 -0
- package/dist/bin/index.js +83 -0
- package/dist/cli/color.js +25 -0
- package/dist/cli/files.js +18 -0
- package/dist/cli/project.js +48 -0
- package/dist/cli/prompts.js +44 -0
- package/dist/cli/release-workflow.js +13 -0
- package/dist/cli/scaffold.js +30 -0
- package/dist/cli/text.js +24 -0
- package/dist/cli/types.js +1 -0
- package/dist/scripts/prepare-template.js +67 -0
- package/package.json +39 -0
- package/template/.editorconfig +8 -0
- package/template/.gitattributes +5 -0
- package/template/.github/dependabot.yml +38 -0
- package/template/.github/workflows/code-quality.yml +70 -0
- package/template/.github/workflows/release.yml +112 -0
- package/template/.husky/pre-commit +7 -0
- package/template/.oxfmtrc.json +36 -0
- package/template/.oxlintrc.json +24 -0
- package/template/.vscode/extensions.json +11 -0
- package/template/CHANGELOG.md +12 -0
- package/template/LICENSE +21 -0
- package/template/README.md +126 -0
- package/template/components.json +24 -0
- package/template/eslint.config.ts +32 -0
- package/template/index.html +14 -0
- package/template/package.json +74 -0
- package/template/pnpm-lock.yaml +3953 -0
- package/template/pnpm-workspace.yaml +3 -0
- package/template/public/favicon.ico +0 -0
- package/template/rust-toolchain.toml +2 -0
- package/template/scripts/bump-version.js +42 -0
- package/template/scripts/rename-app.js +137 -0
- package/template/scripts/utils.js +59 -0
- package/template/src/App.vue +71 -0
- package/template/src/assets/fonts/Geist/Geist-Italic[wght].woff2 +0 -0
- package/template/src/assets/fonts/Geist/Geist[wght].woff2 +0 -0
- package/template/src/assets/images/tauri.svg +6 -0
- package/template/src/assets/images/vite.svg +1 -0
- package/template/src/assets/images/vue.svg +1 -0
- package/template/src/generated/auto-import.d.ts +139 -0
- package/template/src/generated/bindings.ts +9 -0
- package/template/src/lib/utils.ts +8 -0
- package/template/src/main.ts +9 -0
- package/template/src/styles/fonts.css +15 -0
- package/template/src/styles/globals.css +130 -0
- package/template/src/vite-env.d.ts +7 -0
- package/template/src-tauri/Cargo.lock +6328 -0
- package/template/src-tauri/Cargo.toml +41 -0
- package/template/src-tauri/build.rs +3 -0
- package/template/src-tauri/capabilities/default.json +7 -0
- package/template/src-tauri/icons/128x128.png +0 -0
- package/template/src-tauri/icons/128x128@2x.png +0 -0
- package/template/src-tauri/icons/32x32.png +0 -0
- package/template/src-tauri/icons/Square107x107Logo.png +0 -0
- package/template/src-tauri/icons/Square142x142Logo.png +0 -0
- package/template/src-tauri/icons/Square150x150Logo.png +0 -0
- package/template/src-tauri/icons/Square284x284Logo.png +0 -0
- package/template/src-tauri/icons/Square30x30Logo.png +0 -0
- package/template/src-tauri/icons/Square310x310Logo.png +0 -0
- package/template/src-tauri/icons/Square44x44Logo.png +0 -0
- package/template/src-tauri/icons/Square71x71Logo.png +0 -0
- package/template/src-tauri/icons/Square89x89Logo.png +0 -0
- package/template/src-tauri/icons/StoreLogo.png +0 -0
- package/template/src-tauri/icons/icon.icns +0 -0
- package/template/src-tauri/icons/icon.ico +0 -0
- package/template/src-tauri/icons/icon.png +0 -0
- package/template/src-tauri/src/command/mod.rs +13 -0
- package/template/src-tauri/src/lib.rs +54 -0
- package/template/src-tauri/src/main.rs +6 -0
- package/template/src-tauri/tauri.conf.json +37 -0
- package/template/tsconfig.app.json +11 -0
- package/template/tsconfig.json +11 -0
- package/template/tsconfig.node.json +11 -0
- package/template/vite.config.ts +42 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- release
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: release-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
NODE_VERSION: 24
|
|
15
|
+
PNPM_VERSION: 11
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
- platform: macos-latest
|
|
26
|
+
args: --target aarch64-apple-darwin
|
|
27
|
+
- platform: macos-latest
|
|
28
|
+
args: --target x86_64-apple-darwin
|
|
29
|
+
- platform: ubuntu-22.04
|
|
30
|
+
args: ''
|
|
31
|
+
- platform: windows-latest
|
|
32
|
+
args: ''
|
|
33
|
+
|
|
34
|
+
runs-on: ${{ matrix.platform }}
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout repository
|
|
38
|
+
uses: actions/checkout@v6
|
|
39
|
+
|
|
40
|
+
- name: Install Linux dependencies
|
|
41
|
+
if: matrix.platform == 'ubuntu-22.04'
|
|
42
|
+
run: |
|
|
43
|
+
sudo apt-get update
|
|
44
|
+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
45
|
+
|
|
46
|
+
- name: Setup pnpm
|
|
47
|
+
uses: pnpm/action-setup@v6
|
|
48
|
+
with:
|
|
49
|
+
version: ${{ env.PNPM_VERSION }}
|
|
50
|
+
|
|
51
|
+
- name: Setup Node.js
|
|
52
|
+
uses: actions/setup-node@v6
|
|
53
|
+
with:
|
|
54
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
55
|
+
cache: pnpm
|
|
56
|
+
|
|
57
|
+
- name: Setup Rust
|
|
58
|
+
uses: dtolnay/rust-toolchain@stable
|
|
59
|
+
with:
|
|
60
|
+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
|
61
|
+
|
|
62
|
+
- name: Rust cache
|
|
63
|
+
uses: swatinem/rust-cache@v2
|
|
64
|
+
with:
|
|
65
|
+
workspaces: './src-tauri -> target'
|
|
66
|
+
|
|
67
|
+
- name: Install frontend dependencies
|
|
68
|
+
run: pnpm install --frozen-lockfile
|
|
69
|
+
|
|
70
|
+
- name: Read release changelog
|
|
71
|
+
id: changelog
|
|
72
|
+
shell: pwsh
|
|
73
|
+
run: |
|
|
74
|
+
$version = $env:GITHUB_REF_NAME -replace '^v', ''
|
|
75
|
+
if ($version -eq $env:GITHUB_REF_NAME) {
|
|
76
|
+
$version = node -p "require('./package.json').version"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
$content = Get-Content CHANGELOG.md -Raw
|
|
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 -or [string]::IsNullOrWhiteSpace($match.Groups["body"].Value)) {
|
|
85
|
+
Write-Error "No changelog entry found for version $version"
|
|
86
|
+
exit 1
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
$ref = $env:GITHUB_REF_NAME
|
|
90
|
+
$anchor = $match.Groups["heading"].Value.Trim().ToLowerInvariant()
|
|
91
|
+
$anchor = $anchor -replace '[\[\]\.]', ''
|
|
92
|
+
$anchor = $anchor -replace '[^a-z0-9 _-]', ''
|
|
93
|
+
$anchor = $anchor -replace '\s+', '-'
|
|
94
|
+
$changelogUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/blob/$ref/CHANGELOG.md#$anchor"
|
|
95
|
+
$body = $match.Groups["body"].Value.Trim() + "`n`n[See full changelog]($changelogUrl)"
|
|
96
|
+
$delimiter = [guid]::NewGuid().ToString()
|
|
97
|
+
|
|
98
|
+
"body<<$delimiter" >> $env:GITHUB_OUTPUT
|
|
99
|
+
$body >> $env:GITHUB_OUTPUT
|
|
100
|
+
$delimiter >> $env:GITHUB_OUTPUT
|
|
101
|
+
|
|
102
|
+
- name: Build and upload release
|
|
103
|
+
uses: tauri-apps/tauri-action@v0
|
|
104
|
+
env:
|
|
105
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
106
|
+
with:
|
|
107
|
+
tagName: v__VERSION__
|
|
108
|
+
releaseName: Tauri Vue Template v__VERSION__
|
|
109
|
+
releaseBody: ${{ steps.changelog.outputs.body }}
|
|
110
|
+
releaseDraft: true
|
|
111
|
+
prerelease: false
|
|
112
|
+
args: ${{ matrix.args }}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
+
"endOfLine": "lf",
|
|
4
|
+
"ignorePatterns": ["dist/**", "src/generated/**", "src-tauri/gen/**", "src-tauri/target/**"],
|
|
5
|
+
"jsxSingleQuote": true,
|
|
6
|
+
"printWidth": 100,
|
|
7
|
+
"semi": true,
|
|
8
|
+
"singleQuote": true,
|
|
9
|
+
"sortImports": {
|
|
10
|
+
"newlinesBetween": true,
|
|
11
|
+
"groups": [
|
|
12
|
+
"type-import",
|
|
13
|
+
"value-builtin",
|
|
14
|
+
"value-external",
|
|
15
|
+
"value-internal",
|
|
16
|
+
["value-parent", "value-sibling", "value-index"],
|
|
17
|
+
"style",
|
|
18
|
+
"side_effect",
|
|
19
|
+
"unknown"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"sortTailwindcss": {
|
|
23
|
+
"functions": ["clsx", "cn", "cva", "twMerge"]
|
|
24
|
+
},
|
|
25
|
+
"tabWidth": 4,
|
|
26
|
+
"trailingComma": "all",
|
|
27
|
+
|
|
28
|
+
"overrides": [
|
|
29
|
+
{
|
|
30
|
+
"files": ["**/*.yml", "**/*.yaml"],
|
|
31
|
+
"options": {
|
|
32
|
+
"tabWidth": 2
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["eslint", "import", "oxc", "typescript", "vue"],
|
|
4
|
+
"env": {
|
|
5
|
+
"browser": true
|
|
6
|
+
},
|
|
7
|
+
"categories": {
|
|
8
|
+
"correctness": "error"
|
|
9
|
+
},
|
|
10
|
+
"ignorePatterns": ["dist/**", "src/generated/**", "src-tauri/target/**"],
|
|
11
|
+
"rules": {
|
|
12
|
+
"curly": "error",
|
|
13
|
+
"import/consistent-type-specifier-style": "error",
|
|
14
|
+
"typescript/consistent-type-imports": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
"prefer": "type-imports",
|
|
18
|
+
"fixStyle": "separate-type-imports"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"typescript/no-empty-object-type": "off",
|
|
22
|
+
"typescript/no-explicit-any": "off"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.0.1 - 2026-05-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Initial Tauri 2 desktop application template with Vue 3, TypeScript, Vite, and Tailwind CSS 4.
|
|
8
|
+
- shadcn-vue conventions, Lucide Vue, and shared UI utilities for application interface development.
|
|
9
|
+
- Rust backend shell with Tauri command registration and generated Rust-to-TypeScript bindings through Specta.
|
|
10
|
+
- Project scripts for development, production builds, app renaming, version bumping, linting, and formatting.
|
|
11
|
+
- GitHub Actions workflows for frontend quality checks, Rust formatting and Clippy checks, and cross-platform release builds.
|
|
12
|
+
- Release packaging for macOS, Linux, and Windows through `tauri-apps/tauri-action`.
|
package/template/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 duonghieu0712z
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Tauri Vue Template
|
|
2
|
+
|
|
3
|
+
A compact Tauri 2 + Vue 3 template for desktop apps. It includes TypeScript, Vite, Tailwind CSS 4, shadcn-vue conventions, typed Rust-to-TypeScript bindings through Specta, and GitHub Actions for code quality and release builds.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
This template keeps the stack focused on the pieces that usually need project-level wiring:
|
|
8
|
+
|
|
9
|
+
- [Tauri 2](https://tauri.app/) with [Rust](https://www.rust-lang.org/) for the desktop shell and backend commands
|
|
10
|
+
- [Vue 3](https://vuejs.org/), [TypeScript](https://www.typescriptlang.org/), and [Vite](https://vite.dev/) for the frontend
|
|
11
|
+
- [shadcn-vue](https://www.shadcn-vue.com/) conventions with [Tailwind CSS 4](https://tailwindcss.com/) and [Lucide Vue](https://lucide.dev/) for UI
|
|
12
|
+
- [Specta](https://github.com/specta-rs/specta) and [tauri-specta](https://github.com/oscartbeaumont/tauri-specta) for generated Rust-to-TypeScript bindings
|
|
13
|
+
- [Oxlint](https://oxc.rs/docs/guide/usage/linter.html), [ESLint](https://eslint.org/), and [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) for linting and formatting
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
Install Node.js, pnpm, Rust, and the Tauri system dependencies for your operating system. The package is configured for Node.js `^20.19.0 || >=22.12.0`; GitHub Actions currently use Node.js 24 and pnpm 11.
|
|
18
|
+
|
|
19
|
+
On Ubuntu/Debian, install the Tauri Linux dependencies:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sudo apt-get update
|
|
23
|
+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Create a New Project
|
|
27
|
+
|
|
28
|
+
After publishing the create package, scaffold a new project with:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm create @duonghieu0712z/tauri-vue-template@latest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Pass values directly when needed:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm create @duonghieu0712z/tauri-vue-template@latest my-app --name "My App" --id "com.example.my-app" --author "Your Name"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The create package copies this template into the target directory, updates the package name, Tauri product name, application identifier, Rust crate names, release workflow metadata, and then leaves dependency installation to the new project.
|
|
41
|
+
|
|
42
|
+
## Development
|
|
43
|
+
|
|
44
|
+
Install dependencies:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm install
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Run the desktop app in development mode:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm start
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Local Build
|
|
57
|
+
|
|
58
|
+
Build the full Tauri desktop app locally:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pnpm make
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The generated installers and bundles are written under `src-tauri/target/release/bundle/`.
|
|
65
|
+
|
|
66
|
+
## Quality Checks
|
|
67
|
+
|
|
68
|
+
Check formatting and linting:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm format
|
|
72
|
+
pnpm lint
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Apply automatic fixes:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pnpm format:fix
|
|
79
|
+
pnpm lint:fix
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Rust and TypeScript Bridge
|
|
83
|
+
|
|
84
|
+
Backend commands live in `src-tauri/src/command/` and are registered through `tauri-specta`. During debug builds, Specta exports TypeScript bindings to `src/generated/bindings.ts`, so frontend calls can use generated types instead of manually duplicated contracts.
|
|
85
|
+
|
|
86
|
+
## Rename the App
|
|
87
|
+
|
|
88
|
+
After creating a new project from this template, update the application name and Tauri identifier:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm rename --name "My App" --id "com.example.my-app" --author "Your Name"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Set the package name explicitly when needed:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pnpm rename --name "My App" --id "com.example.my-app" --author "Your Name" --package "my-app"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
After renaming, review the updated project identity in:
|
|
101
|
+
|
|
102
|
+
- `package.json`
|
|
103
|
+
- `index.html`
|
|
104
|
+
- `src-tauri/tauri.conf.json`
|
|
105
|
+
- `src-tauri/Cargo.toml`
|
|
106
|
+
- `src-tauri/src/main.rs`
|
|
107
|
+
- `.github/workflows/release.yml`
|
|
108
|
+
|
|
109
|
+
Regenerate lockfiles after renaming:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pnpm install
|
|
113
|
+
cargo check --manifest-path src-tauri/Cargo.toml
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Versioning and Releases
|
|
117
|
+
|
|
118
|
+
Bump the app version:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pnpm bump 0.1.0
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The version script updates `package.json`, `src-tauri/tauri.conf.json`, and `src-tauri/Cargo.toml`.
|
|
125
|
+
|
|
126
|
+
The release workflow builds macOS, Linux, and Windows bundles with `tauri-apps/tauri-action`, then creates a GitHub Release with the generated installers attached.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"font": "geist-sans",
|
|
5
|
+
"typescript": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"rtl": false,
|
|
15
|
+
"pointer": true,
|
|
16
|
+
"aliases": {
|
|
17
|
+
"components": "@/components",
|
|
18
|
+
"utils": "@/lib/utils",
|
|
19
|
+
"ui": "@/components/ui",
|
|
20
|
+
"lib": "@/lib",
|
|
21
|
+
"composables": "@/composables"
|
|
22
|
+
},
|
|
23
|
+
"registries": {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
|
2
|
+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
|
|
3
|
+
import pluginOxlint from 'eslint-plugin-oxlint';
|
|
4
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
5
|
+
import { globalIgnores } from 'eslint/config';
|
|
6
|
+
|
|
7
|
+
export default defineConfigWithVueTs(
|
|
8
|
+
{
|
|
9
|
+
name: 'app/files-to-lint',
|
|
10
|
+
files: ['**/*.{vue,ts,mts,tsx}'],
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
globalIgnores(['dist/**', 'src/generated/**', 'src-tauri/target/**']),
|
|
14
|
+
|
|
15
|
+
...pluginVue.configs['flat/essential'],
|
|
16
|
+
vueTsConfigs.recommended,
|
|
17
|
+
|
|
18
|
+
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
|
|
19
|
+
|
|
20
|
+
skipFormatting,
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
rules: {
|
|
24
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
25
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
26
|
+
|
|
27
|
+
'vue/attributes-order': ['error', { alphabetical: true }],
|
|
28
|
+
'vue/multi-word-component-names': 'off',
|
|
29
|
+
'vue/require-default-prop': 'off',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" href="favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Tauri Vue Template</title>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="src/main.ts"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tauri-vue-template",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"author": "duonghieu0712z",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"build-only": "vite build",
|
|
12
|
+
"type-check": "vue-tsc --noEmit",
|
|
13
|
+
"start": "pnpm tauri dev",
|
|
14
|
+
"make": "pnpm tauri build",
|
|
15
|
+
"lint": "run-s lint:check:*",
|
|
16
|
+
"lint:fix": "run-s lint:fix:*",
|
|
17
|
+
"lint:check:oxlint": "oxlint .",
|
|
18
|
+
"lint:check:eslint": "eslint . --cache",
|
|
19
|
+
"lint:fix:oxlint": "oxlint --fix .",
|
|
20
|
+
"lint:fix:eslint": "eslint --fix . --cache",
|
|
21
|
+
"format": "oxfmt --check .",
|
|
22
|
+
"format:fix": "oxfmt .",
|
|
23
|
+
"bump": "node scripts/bump-version.js",
|
|
24
|
+
"rename": "node scripts/rename-app.js",
|
|
25
|
+
"prepare": "husky"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@lucide/vue": "^1.16.0",
|
|
29
|
+
"@tauri-apps/api": "^2.11.0",
|
|
30
|
+
"class-variance-authority": "^0.7.1",
|
|
31
|
+
"clsx": "^2.1.1",
|
|
32
|
+
"tailwind-merge": "^3.6.0",
|
|
33
|
+
"vue": "^3.5.34"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
37
|
+
"@tauri-apps/cli": "^2.11.2",
|
|
38
|
+
"@tsconfig/node24": "^24.0.4",
|
|
39
|
+
"@types/node": "^25.9.1",
|
|
40
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
41
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
42
|
+
"@vue/eslint-config-typescript": "^14.7.0",
|
|
43
|
+
"@vue/tsconfig": "^0.9.1",
|
|
44
|
+
"eslint": "^10.4.0",
|
|
45
|
+
"eslint-plugin-oxlint": "^1.66.0",
|
|
46
|
+
"eslint-plugin-vue": "^10.9.1",
|
|
47
|
+
"husky": "^9.1.7",
|
|
48
|
+
"jiti": "^2.7.0",
|
|
49
|
+
"lint-staged": "^17.0.5",
|
|
50
|
+
"npm-run-all2": "^9.0.0",
|
|
51
|
+
"oxfmt": "^0.51.0",
|
|
52
|
+
"oxlint": "^1.66.0",
|
|
53
|
+
"tailwindcss": "^4.3.0",
|
|
54
|
+
"tw-animate-css": "^1.4.0",
|
|
55
|
+
"typescript": "~6.0.3",
|
|
56
|
+
"unplugin-auto-import": "^21.0.0",
|
|
57
|
+
"unplugin-vue-components": "^32.1.0",
|
|
58
|
+
"vite": "^8.0.14",
|
|
59
|
+
"vite-plugin-vue-devtools": "^8.1.2",
|
|
60
|
+
"vue-tsc": "^3.3.1"
|
|
61
|
+
},
|
|
62
|
+
"lint-staged": {
|
|
63
|
+
"*.{js,ts,tsx,vue,html,css,json,yml,yaml}": [
|
|
64
|
+
"oxfmt"
|
|
65
|
+
],
|
|
66
|
+
"*.{js,ts,tsx,vue}": [
|
|
67
|
+
"oxlint --fix",
|
|
68
|
+
"eslint --fix"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
73
|
+
}
|
|
74
|
+
}
|