From: chenpeng991105 Date: Fri, 11 Feb 2022 08:08:08 +0000 (+0800) Subject: fix: fix packageName when npm init vue set valid targetDir (#51) X-Git-Tag: v3.1.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8640830f81d0830e36694aa685aedff5e93626c;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: fix packageName when npm init vue set valid targetDir (#51) --- diff --git a/index.js b/index.js index eb766ff3..a06e9a16 100755 --- a/index.js +++ b/index.js @@ -227,7 +227,7 @@ async function init() { // so we still have to assign the default values here const { projectName, - packageName = projectName, + packageName = projectName || defaultProjectName, shouldOverwrite = argv.force, needsJsx = argv.jsx, needsTypeScript = argv.typescript,