@duonghieu0712z/create-tauri-vue-template 0.0.19 → 0.0.20

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duonghieu0712z/create-tauri-vue-template",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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:
@@ -50,7 +50,7 @@ jobs:
50
50
  - name: Check types
51
51
  run: pnpm type-check
52
52
 
53
- rust:
53
+ tauri-quality:
54
54
  runs-on: ubuntu-latest
55
55
 
56
56
  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}': ['oxfmt --no-error-on-unmatched-pattern'],
3
- '*.{js,ts,tsx,vue}': ['oxlint --fix', 'eslint --fix'],
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
  };
@@ -51,6 +51,7 @@
51
51
  "npm-run-all2": "^9.0.1",
52
52
  "oxfmt": "^0.51.0",
53
53
  "oxlint": "^1.66.0",
54
+ "picomatch": "^4.0.4",
54
55
  "tailwindcss": "^4.3.0",
55
56
  "tw-animate-css": "^1.4.0",
56
57
  "typescript": "~6.0.3",
@@ -78,6 +78,9 @@ importers:
78
78
  oxlint:
79
79
  specifier: ^1.66.0
80
80
  version: 1.66.0
81
+ picomatch:
82
+ specifier: ^4.0.4
83
+ version: 4.0.4
81
84
  tailwindcss:
82
85
  specifier: ^4.3.0
83
86
  version: 4.3.0