Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-generator): 修复 create-mor 在当前目录项目初始化完成提示 #14

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/plugin-generator/src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ export default async function create(
const projectDir = path.relative(generator.baseDir, generator.to)

generator.logger.success(
`项目初始化完成 ^_^\n\n` +
chalk.green(`cd ${projectDir} && ${startCommand}\n\n`) +
'即可开始开发。'
'项目初始化完成 ^_^\n\n' +
chalk.green(
(projectDir ? `cd ${projectDir} && ` : '') + startCommand
) +
'\n\n即可开始开发。'
)
}
}
Expand Down