@duonghieu0712z/create-tauri-vue-template 0.0.3 → 0.0.5

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 CHANGED
@@ -1,21 +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.
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.
@@ -1,10 +1,12 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { readJson, updateText, writeJson } from './files.js';
3
3
  import { updateReleaseWorkflow } from './release-workflow.js';
4
+ const initialProjectVersion = '0.0.1';
4
5
  export async function renameProject(targetDir, identity) {
5
6
  const packageJsonPath = resolve(targetDir, 'package.json');
6
7
  const packageJson = await readJson(packageJsonPath);
7
8
  packageJson.name = identity.packageName;
9
+ packageJson.version = initialProjectVersion;
8
10
  if (identity.author) {
9
11
  packageJson.author = identity.author;
10
12
  }
@@ -15,6 +17,7 @@ export async function renameProject(targetDir, identity) {
15
17
  const tauriConfigPath = resolve(targetDir, 'src-tauri', 'tauri.conf.json');
16
18
  const tauriConfig = await readJson(tauriConfigPath);
17
19
  tauriConfig.productName = identity.appName;
20
+ tauriConfig.version = initialProjectVersion;
18
21
  tauriConfig.identifier = identity.identifier;
19
22
  tauriConfig.app.windows = tauriConfig.app.windows.map((window) => ({
20
23
  ...window,
@@ -32,6 +35,7 @@ export async function renameProject(targetDir, identity) {
32
35
  ]);
33
36
  await updateText(resolve(targetDir, 'src-tauri', 'Cargo.toml'), [
34
37
  [/^name = "([^"]+)"/m, `name = "${identity.crateName}"`],
38
+ [/^version = "([^"]+)"/m, `version = "${initialProjectVersion}"`],
35
39
  [/^description = "([^"]+)"/m, `description = "${identity.appName}"`],
36
40
  [/^(\[lib\]\s+[\s\S]*?^name = )"([^"]+)"/m, `$1"${identity.crateLibName}"`],
37
41
  ]);
@@ -1,4 +1,4 @@
1
- import { access, copyFile, cp, mkdir, readdir } from 'node:fs/promises';
1
+ import { access, copyFile, cp, mkdir, readdir, rm } from 'node:fs/promises';
2
2
  import { resolve } from 'node:path';
3
3
  import { renameProject } from './project.js';
4
4
  export async function ensureEmptyTarget(path) {
@@ -20,11 +20,15 @@ export async function writeEditorSettings(targetDir, packageDir) {
20
20
  await mkdir(resolve(targetDir, '.vscode'), { recursive: true });
21
21
  await copyFile(resolve(packageDir, 'assets', 'vscode-settings.json'), resolve(targetDir, '.vscode', 'settings.json'));
22
22
  }
23
+ async function removeTemplateArtifacts(targetDir) {
24
+ await Promise.all(['CHANGELOG.md', 'Changelog.md', 'changelog.md'].map((fileName) => rm(resolve(targetDir, fileName), { force: true })));
25
+ }
23
26
  export async function scaffoldProject(targetDir, packageDir, identity) {
24
27
  const templateDir = resolve(packageDir, 'template');
25
28
  await ensureTemplate(templateDir);
26
29
  await ensureEmptyTarget(targetDir);
27
30
  await cp(templateDir, targetDir, { recursive: true });
31
+ await removeTemplateArtifacts(targetDir);
28
32
  await writeEditorSettings(targetDir, packageDir);
29
33
  await renameProject(targetDir, identity);
30
34
  }
@@ -22,11 +22,14 @@ const excludedPaths = new Set([
22
22
  'packages',
23
23
  'src-tauri/target',
24
24
  ]);
25
+ const excludedFileNames = new Set(['changelog.md']);
25
26
  function normalizePath(path) {
26
27
  return path.replaceAll('\\', '/');
27
28
  }
28
29
  function shouldInclude(relativePath) {
29
- return !excludedPaths.has(normalizePath(relativePath));
30
+ const normalizedPath = normalizePath(relativePath);
31
+ const fileName = normalizedPath.split('/').at(-1)?.toLowerCase();
32
+ return !excludedPaths.has(normalizedPath) && !excludedFileNames.has(fileName ?? '');
30
33
  }
31
34
  async function copyTemplateSource(sourceDir) {
32
35
  await mkdir(templateDir, { recursive: true });
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@duonghieu0712z/create-tauri-vue-template",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/duonghieu0712z/create-tauri-vue-template"
8
+ },
5
9
  "bin": {
6
10
  "create-tauri-vue-template": "dist/bin/index.js"
7
11
  },
@@ -1,12 +0,0 @@
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`.