!93 create-inula体验提升

Merge pull request !93 from Hoikan/bugfix-create
This commit is contained in:
openInula-robot 2023-12-01 08:59:53 +00:00 committed by Gitee
commit 977e4cbd1e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,4 @@
# openinula + vite
该模板提供了 `openinula` 工作在 `vite`的基础配置。
> 请注意由于Vite插件有node版本限制请使用`node -v`命令确认node版本大于等于node v18。

View File

@ -0,0 +1,4 @@
# openinula + vite
该模板提供了 `openinula` 工作在 `vite`的基础配置。
> 请注意由于Vite插件有node版本限制请使用`node -v`命令确认node版本大于等于node v18。

View File

@ -62,7 +62,17 @@ const run = async config => {
}
process.emit('message', { type: 'prompt' });
let { type } = config;
let { type, name } = config;
if (!name) {
const answers = await inquirer.prompt([
{
name: 'projectName',
message: 'Project name',
type: 'input'
},
]);
config.name = answers.projectName;
}
if (!type) {
const answers = await inquirer.prompt([
{

View File

@ -6,6 +6,9 @@
"bin": {
"create-inula": "bin/cli.js"
},
"engines": {
"node": ">= 18.0.0"
},
"files": [
"bin",
"lib",