create-tauri-vue-app 0.0.7 → 0.0.8
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/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { cpSync, mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs'
|
|
3
|
+
import { cpSync, mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync, unlinkSync } from 'node:fs'
|
|
4
4
|
import { join, dirname } from 'node:path'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
6
|
|
|
@@ -49,6 +49,17 @@ mkdirSync(targetDir, { recursive: true })
|
|
|
49
49
|
const templateDir = join(__dirname, 'template')
|
|
50
50
|
copyRecursive(templateDir, targetDir)
|
|
51
51
|
|
|
52
|
+
// 把 _gitignore 重命名为 .gitignore
|
|
53
|
+
const tempGitIgnore = join(targetDir, '_gitignore')
|
|
54
|
+
const realGitIgnore = join(targetDir, '.gitignore')
|
|
55
|
+
if (existsSync(tempGitIgnore)) {
|
|
56
|
+
// 覆盖写入,防止已有.gitignore
|
|
57
|
+
const buf = readFileSync(tempGitIgnore)
|
|
58
|
+
writeFileSync(realGitIgnore, buf)
|
|
59
|
+
// 可选:删掉临时 _gitignore 文件
|
|
60
|
+
unlinkSync(tempGitIgnore)
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
// Replace placeholder with project name
|
|
53
64
|
replaceInFiles(targetDir, '{{PROJECT_NAME}}', projectName)
|
|
54
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-tauri-vue-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Scaffold a new Tauri + Vue desktop application",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"scaffold",
|
|
16
16
|
"template"
|
|
17
17
|
],
|
|
18
|
-
"files": [
|
|
19
|
-
"template",
|
|
20
|
-
"template/.gitignore",
|
|
21
|
-
"template/.npmignore"
|
|
22
|
-
],
|
|
23
18
|
"author": "",
|
|
24
19
|
"license": "MIT"
|
|
25
20
|
}
|
package/template/.npmignore
DELETED
|
File without changes
|
|
File without changes
|