@yyp92-cli/create 0.2.2 → 0.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @yyp92-cli/create
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 修复所有模板丢失.gitignore 文件
8
+
9
+ ## 0.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 更改包
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @yyp92-cli/utils@0.2.0
19
+
3
20
  ## 0.2.2
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yyp92-cli/create",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,7 +17,7 @@
17
17
  "fs-extra": "^11.3.1",
18
18
  "glob": "^11.0.3",
19
19
  "ora": "^8.2.0",
20
- "@yyp92-cli/utils": "0.1.0"
20
+ "@yyp92-cli/utils": "0.2.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/ejs": "^3.1.5",
package/src/index.ts CHANGED
@@ -103,6 +103,13 @@ async function create() {
103
103
  const targetPath = path.join(process.cwd(), projectName)
104
104
  fse.copySync(templatePath, targetPath)
105
105
 
106
+ // 将 gitignore.template 重命名为 .gitignore
107
+ const targetGitignore = path.resolve(targetPath, '.gitignore')
108
+ const sourceGitignoreTemplate = path.resolve(targetPath, 'gitignore.template')
109
+ if (await fse.exists(sourceGitignoreTemplate)) {
110
+ await fse.rename(sourceGitignoreTemplate, targetGitignore)
111
+ }
112
+
106
113
  // 清除多余的布局文件夹
107
114
  if (layout === 'horizontal') {
108
115
  const targetDir = path.join(targetPath, '/src/components/layout')