]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: should use packageName in README if created in current directory
authorHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 25 Jul 2022 16:21:34 +0000 (00:21 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 25 Jul 2022 16:21:34 +0000 (00:21 +0800)
index.ts

index c0a18c5661fd49e125179333d967b3dde035455f..921fc227eb0c392455b05b7c8a0e2b4b03a781ed 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -403,7 +403,7 @@ async function init() {
   fs.writeFileSync(
     path.resolve(root, 'README.md'),
     generateReadme({
-      projectName: result.projectName ?? defaultProjectName,
+      projectName: result.projectName ?? result.packageName ?? defaultProjectName,
       packageManager,
       needsTypeScript,
       needsVitest,