From: Haoqun Jiang Date: Mon, 24 Jan 2022 08:00:55 +0000 (+0800) Subject: fix: show `npm run lint` in messages if user installs prettier X-Git-Tag: v3.1.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fce31aecac224d47dda4777d141aee2434955aa2;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: show `npm run lint` in messages if user installs prettier Because the generated template code style doesn't conform to the default prettier configuration --- diff --git a/index.js b/index.js index fc144d29..ea73a84c 100755 --- 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() }