]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: show `npm run lint` in messages if user installs prettier
authorHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 24 Jan 2022 08:00:55 +0000 (16:00 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 24 Jan 2022 08:02:43 +0000 (16:02 +0800)
Because the generated template code style doesn't conform to the default
prettier configuration

index.js

index fc144d29b0aff0b1ef69a627514e7d57ba2f5a94..ea73a84c49546ca9cc6ffc06dff80fda78e7bf3e 100755 (executable)
--- a/index.js
+++ b/index.js
@@ -383,6 +383,9 @@ async function init() {
     console.log(`  ${bold(green(`cd ${path.relative(cwd, root)}`))}`)
   }
   console.log(`  ${bold(green(getCommand(packageManager, 'install')))}`)
+  if (needsPrettier) {
+    console.log(`  ${bold(green(getCommand(packageManager, 'lint')))}`)
+  }
   console.log(`  ${bold(green(getCommand(packageManager, 'dev')))}`)
   console.log()
 }