@yyp92-cli/create 0.3.0 → 0.5.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 +12 -0
- package/package.json +1 -1
- package/src/index.ts +7 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
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.join(targetPath, '.gitignore')
|
|
108
|
+
const sourceGitignoreTemplate = path.join(targetPath, 'gitignore.template')
|
|
109
|
+
if (await fse.exists(sourceGitignoreTemplate)) {
|
|
110
|
+
fse.renameSync(sourceGitignoreTemplate, targetGitignore)
|
|
111
|
+
}
|
|
112
|
+
|
|
106
113
|
// 清除多余的布局文件夹
|
|
107
114
|
if (layout === 'horizontal') {
|
|
108
115
|
const targetDir = path.join(targetPath, '/src/components/layout')
|