@duonghieu0712z/create-tauri-vue-template 0.0.17 → 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.17",
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",
@@ -1,4 +1,6 @@
1
- [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl,html}]
1
+ root = true
2
+
3
+ [*]
2
4
  charset = utf-8
3
5
  end_of_line = lf
4
6
  indent_size = 4
@@ -6,3 +8,9 @@ indent_style = space
6
8
  insert_final_newline = true
7
9
  max_line_length = 100
8
10
  trim_trailing_whitespace = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
14
+
15
+ [*.{yml,yaml}]
16
+ indent_size = 2
@@ -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
@@ -9,28 +9,8 @@
9
9
  --font-ui: 'Geist', var(--font-sans);
10
10
  }
11
11
 
12
- @layer base {
13
- * {
14
- @apply border-border outline-ring/50;
15
- }
16
-
17
- html {
18
- font-synthesis: none;
19
- text-rendering: optimizeLegibility;
20
- -webkit-text-size-adjust: 100%;
21
- }
22
-
23
- body {
24
- @apply bg-background text-foreground font-ui cursor-default antialiased select-none;
25
- }
26
-
27
- button:not(:disabled),
28
- [role='button']:not(:disabled) {
29
- @apply cursor-pointer;
30
- }
31
- }
32
-
33
12
  @theme inline {
13
+ --font-heading: var(--font-sans);
34
14
  --color-sidebar-ring: var(--sidebar-ring);
35
15
  --color-sidebar-border: var(--sidebar-border);
36
16
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -136,3 +116,45 @@
136
116
  --sidebar-border: oklch(1 0 0 / 10%);
137
117
  --sidebar-ring: oklch(0.556 0 0);
138
118
  }
119
+
120
+ @layer base {
121
+ * {
122
+ @apply border-border outline-ring/50;
123
+ }
124
+
125
+ html,
126
+ body,
127
+ #app {
128
+ @apply h-full w-full overflow-hidden overscroll-none;
129
+ }
130
+
131
+ html {
132
+ font-synthesis: none;
133
+ text-rendering: optimizeLegibility;
134
+ -webkit-text-size-adjust: 100%;
135
+ }
136
+
137
+ body {
138
+ @apply bg-background text-foreground font-ui;
139
+ @apply cursor-default antialiased select-none;
140
+ }
141
+
142
+ button:not(:disabled),
143
+ [role='button']:not(:disabled) {
144
+ @apply cursor-pointer;
145
+ }
146
+
147
+ input {
148
+ @apply appearance-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none;
149
+ }
150
+ }
151
+
152
+ @layer utilities {
153
+ .scrollbar {
154
+ @apply [&::-webkit-scrollbar]:w-1.5;
155
+ @apply [&::-webkit-scrollbar-track]:bg-transparent;
156
+ @apply [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:border;
157
+ @apply [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-clip-content;
158
+ @apply [&::-webkit-scrollbar-thumb]:bg-input [&::-webkit-scrollbar-thumb:hover]:bg-ring;
159
+ }
160
+ }
@@ -15,8 +15,15 @@ export default defineConfig(async () => ({
15
15
  vue(),
16
16
  tailwindcss(),
17
17
  vueDevTools(),
18
- AutoImport({ imports: ['vue'], dts: 'src/generated/auto-import.d.ts', vueTemplate: true }),
19
- Components({ dirs: ['src/components'], dts: 'src/generated/components.d.ts' }),
18
+ AutoImport({
19
+ imports: ['vue'],
20
+ dts: 'src/generated/auto-import.d.ts',
21
+ vueTemplate: true,
22
+ }),
23
+ Components({
24
+ dirs: ['src/components'],
25
+ dts: 'src/generated/components.d.ts',
26
+ }),
20
27
  ],
21
28
  resolve: {
22
29
  alias: {