@duonghieu0712z/create-tauri-vue-template 0.0.19 → 0.0.21
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 +1 -1
- package/template/.github/workflows/code-quality.yml +3 -4
- package/template/lint-staged.config.js +33 -2
- package/template/package.json +11 -12
- package/template/pnpm-lock.yaml +454 -389
- package/template/src-tauri/Cargo.lock +128 -128
- package/template/src-tauri/src/lib.rs +1 -3
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ permissions:
|
|
|
11
11
|
contents: read
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
|
-
frontend:
|
|
14
|
+
frontend-quality:
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
|
|
17
17
|
steps:
|
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
run: pnpm format
|
|
37
37
|
|
|
38
38
|
- name: Check oxlint
|
|
39
|
-
run: pnpm lint:
|
|
39
|
+
run: pnpm lint:check:oxlint --format=github
|
|
40
40
|
|
|
41
41
|
- name: Check ESLint
|
|
42
42
|
uses: reviewdog/action-eslint@v1
|
|
@@ -44,13 +44,12 @@ jobs:
|
|
|
44
44
|
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-check' || 'github-check' }}
|
|
45
45
|
filter_mode: ${{ github.event_name == 'pull_request' && 'added' || 'nofilter' }}
|
|
46
46
|
fail_level: error
|
|
47
|
-
workdir: .
|
|
48
47
|
eslint_flags: '. --cache'
|
|
49
48
|
|
|
50
49
|
- name: Check types
|
|
51
50
|
run: pnpm type-check
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
tauri-quality:
|
|
54
53
|
runs-on: ubuntu-latest
|
|
55
54
|
|
|
56
55
|
steps:
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
+
import picomatch from 'picomatch';
|
|
2
|
+
|
|
3
|
+
const ignorePatterns = ['src/generated/**'];
|
|
4
|
+
|
|
5
|
+
const isIgnored = picomatch(ignorePatterns, { dot: true });
|
|
6
|
+
|
|
7
|
+
const normalizePath = (file) => {
|
|
8
|
+
const path = file.replaceAll('\\', '/');
|
|
9
|
+
const cwd = process.cwd().replaceAll('\\', '/');
|
|
10
|
+
|
|
11
|
+
return path.startsWith(`${cwd}/`) ? path.slice(cwd.length + 1) : path;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const shouldIgnore = (file) => isIgnored(normalizePath(file));
|
|
15
|
+
|
|
16
|
+
const filterFiles = (files) => files.filter((file) => !shouldIgnore(file));
|
|
17
|
+
|
|
18
|
+
const quotePath = (file) => `"${file.replaceAll('"', '\\"')}"`;
|
|
19
|
+
|
|
20
|
+
const createCommand = (command, files) => `${command} ${files.map(quotePath).join(' ')}`;
|
|
21
|
+
|
|
1
22
|
export default {
|
|
2
|
-
'*.{js,ts,tsx,vue,html,css,json,yml,yaml}':
|
|
3
|
-
|
|
23
|
+
'*.{js,ts,tsx,vue,html,css,json,yml,yaml}': (files) => {
|
|
24
|
+
const filtered = filterFiles(files);
|
|
25
|
+
return filtered.length > 0
|
|
26
|
+
? [createCommand('oxfmt --no-error-on-unmatched-pattern', filtered)]
|
|
27
|
+
: [];
|
|
28
|
+
},
|
|
29
|
+
'*.{js,ts,tsx,vue}': (files) => {
|
|
30
|
+
const filtered = filterFiles(files);
|
|
31
|
+
return filtered.length > 0
|
|
32
|
+
? [createCommand('oxlint --fix', filtered), createCommand('eslint --fix', filtered)]
|
|
33
|
+
: [];
|
|
34
|
+
},
|
|
4
35
|
'*.rs': () => ['cargo +nightly fmt --manifest-path src-tauri/Cargo.toml'],
|
|
5
36
|
};
|
package/template/package.json
CHANGED
|
@@ -13,11 +13,9 @@
|
|
|
13
13
|
"start": "pnpm tauri dev",
|
|
14
14
|
"make": "pnpm tauri build",
|
|
15
15
|
"lint": "run-s lint:check:*",
|
|
16
|
-
"lint:github": "run-s lint:github:*",
|
|
17
16
|
"lint:fix": "run-s lint:fix:*",
|
|
18
17
|
"lint:check:oxlint": "oxlint .",
|
|
19
18
|
"lint:check:eslint": "eslint . --cache",
|
|
20
|
-
"lint:github:oxlint": "oxlint --format github .",
|
|
21
19
|
"lint:fix:oxlint": "oxlint --fix .",
|
|
22
20
|
"lint:fix:eslint": "eslint --fix . --cache",
|
|
23
21
|
"format": "oxfmt --check .",
|
|
@@ -26,12 +24,12 @@
|
|
|
26
24
|
"prepare": "husky"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"@lucide/vue": "^1.
|
|
27
|
+
"@lucide/vue": "^1.17.0",
|
|
30
28
|
"@tauri-apps/api": "^2.11.0",
|
|
31
29
|
"class-variance-authority": "^0.7.1",
|
|
32
30
|
"clsx": "^2.1.1",
|
|
33
31
|
"tailwind-merge": "^3.6.0",
|
|
34
|
-
"vue": "^3.5.
|
|
32
|
+
"vue": "^3.5.35"
|
|
35
33
|
},
|
|
36
34
|
"devDependencies": {
|
|
37
35
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -42,23 +40,24 @@
|
|
|
42
40
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
43
41
|
"@vue/eslint-config-typescript": "^14.7.0",
|
|
44
42
|
"@vue/tsconfig": "^0.9.1",
|
|
45
|
-
"eslint": "^10.4.
|
|
46
|
-
"eslint-plugin-oxlint": "^1.
|
|
47
|
-
"eslint-plugin-vue": "^10.9.
|
|
43
|
+
"eslint": "^10.4.1",
|
|
44
|
+
"eslint-plugin-oxlint": "^1.68.0",
|
|
45
|
+
"eslint-plugin-vue": "^10.9.2",
|
|
48
46
|
"husky": "^9.1.7",
|
|
49
47
|
"jiti": "^2.7.0",
|
|
50
|
-
"lint-staged": "^17.0.
|
|
48
|
+
"lint-staged": "^17.0.7",
|
|
51
49
|
"npm-run-all2": "^9.0.1",
|
|
52
|
-
"oxfmt": "^0.
|
|
53
|
-
"oxlint": "^1.
|
|
50
|
+
"oxfmt": "^0.53.0",
|
|
51
|
+
"oxlint": "^1.68.0",
|
|
52
|
+
"picomatch": "^4.0.4",
|
|
54
53
|
"tailwindcss": "^4.3.0",
|
|
55
54
|
"tw-animate-css": "^1.4.0",
|
|
56
55
|
"typescript": "~6.0.3",
|
|
57
56
|
"unplugin-auto-import": "^21.0.0",
|
|
58
57
|
"unplugin-vue-components": "^32.1.0",
|
|
59
|
-
"vite": "^8.0.
|
|
58
|
+
"vite": "^8.0.16",
|
|
60
59
|
"vite-plugin-vue-devtools": "^8.1.2",
|
|
61
|
-
"vue-tsc": "^3.3.
|
|
60
|
+
"vue-tsc": "^3.3.3"
|
|
62
61
|
},
|
|
63
62
|
"engines": {
|
|
64
63
|
"node": "^20.19.0 || >=22.12.0"
|