@duonghieu0712z/create-tauri-vue-template 0.0.12 → 0.0.14

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/README.md CHANGED
@@ -16,7 +16,7 @@ Pass values directly when needed:
16
16
  pnpm create @duonghieu0712z/tauri-vue-template@latest my-app --name "My App" --id "com.example.my-app" --author "Your Name"
17
17
  ```
18
18
 
19
- The CLI copies the bundled template into the target directory, updates the package name, Tauri product name, application identifier, Rust crate names, release workflow metadata, and VS Code workspace settings.
19
+ The CLI copies the bundled template into the target directory, updates the package name, Tauri product name, application identifier, Rust crate names, release workflow metadata, VS Code workspace settings, and initializes a Git repository.
20
20
 
21
21
  ## Development
22
22
 
@@ -1,6 +1,9 @@
1
+ import { execFile } from 'node:child_process';
1
2
  import { access, copyFile, cp, mkdir, readdir, rm } from 'node:fs/promises';
2
3
  import { resolve } from 'node:path';
4
+ import { promisify } from 'node:util';
3
5
  import { renameProject } from './project.js';
6
+ const execFileAsync = promisify(execFile);
4
7
  export async function ensureEmptyTarget(path) {
5
8
  await mkdir(path, { recursive: true });
6
9
  const entries = await readdir(path);
@@ -33,6 +36,9 @@ async function restorePackagedGitignore(targetDir) {
33
36
  }
34
37
  }));
35
38
  }
39
+ async function initializeGitRepository(targetDir) {
40
+ await execFileAsync('git', ['init'], { cwd: targetDir });
41
+ }
36
42
  export async function scaffoldProject(targetDir, packageDir, identity) {
37
43
  const templateDir = resolve(packageDir, 'template');
38
44
  await ensureTemplate(templateDir);
@@ -41,4 +47,5 @@ export async function scaffoldProject(targetDir, packageDir, identity) {
41
47
  await restorePackagedGitignore(targetDir);
42
48
  await removeTemplateArtifacts(targetDir);
43
49
  await renameProject(targetDir, identity);
50
+ await initializeGitRepository(targetDir);
44
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duonghieu0712z/create-tauri-vue-template",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,6 +23,8 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^25.9.1",
26
+ "husky": "^9.1.7",
27
+ "lint-staged": "^17.0.5",
26
28
  "oxfmt": "^0.51.0",
27
29
  "oxlint": "^1.66.0",
28
30
  "typescript": "~6.0.3"
@@ -36,6 +38,7 @@
36
38
  "format": "oxfmt --check .",
37
39
  "format:fix": "oxfmt .",
38
40
  "lint": "oxlint .",
39
- "lint:fix": "oxlint --fix ."
41
+ "lint:fix": "oxlint --fix .",
42
+ "lint-staged": "lint-staged"
40
43
  }
41
44
  }
@@ -7,12 +7,9 @@ on:
7
7
  - main
8
8
 
9
9
  permissions:
10
+ checks: write
10
11
  contents: read
11
12
 
12
- env:
13
- NODE_VERSION: '24'
14
- PNPM_VERSION: '11'
15
-
16
13
  jobs:
17
14
  frontend:
18
15
  runs-on: ubuntu-latest
@@ -42,7 +39,13 @@ jobs:
42
39
  run: pnpm lint:github:oxlint
43
40
 
44
41
  - name: Check ESLint
45
- run: pnpm lint:github:eslint
42
+ uses: reviewdog/action-eslint@v1
43
+ with:
44
+ reporter: ${{ github.event_name == 'pull_request' && 'github-pr-check' || 'github-check' }}
45
+ filter_mode: ${{ github.event_name == 'pull_request' && 'added' || 'nofilter' }}
46
+ fail_level: error
47
+ workdir: .
48
+ eslint_flags: '. --cache'
46
49
 
47
50
  - name: Check types
48
51
  run: pnpm type-check
@@ -18,7 +18,6 @@
18
18
  "lint:check:oxlint": "oxlint .",
19
19
  "lint:check:eslint": "eslint . --cache",
20
20
  "lint:github:oxlint": "oxlint --format github .",
21
- "lint:github:eslint": "eslint . --cache --format github",
22
21
  "lint:fix:oxlint": "oxlint --fix .",
23
22
  "lint:fix:eslint": "eslint --fix . --cache",
24
23
  "format": "oxfmt --check .",
@@ -44,7 +43,6 @@
44
43
  "@vue/eslint-config-typescript": "^14.7.0",
45
44
  "@vue/tsconfig": "^0.9.1",
46
45
  "eslint": "^10.4.0",
47
- "eslint-formatter-github": "^1.1.4",
48
46
  "eslint-plugin-oxlint": "^1.66.0",
49
47
  "eslint-plugin-vue": "^10.9.1",
50
48
  "husky": "^9.1.7",