[create-inula]<fix>明确node版本 & 项目名优化
This commit is contained in:
parent
a582641879
commit
eda41a98a6
|
@ -0,0 +1,4 @@
|
||||||
|
# openinula + vite
|
||||||
|
|
||||||
|
该模板提供了 `openinula` 工作在 `vite`的基础配置。
|
||||||
|
> 请注意由于Vite插件有node版本限制,请使用`node -v`命令确认node版本大于等于node v18。
|
|
@ -0,0 +1,4 @@
|
||||||
|
# openinula + vite
|
||||||
|
|
||||||
|
该模板提供了 `openinula` 工作在 `vite`的基础配置。
|
||||||
|
> 请注意由于Vite插件有node版本限制,请使用`node -v`命令确认node版本大于等于node v18。
|
|
@ -62,7 +62,17 @@ const run = async config => {
|
||||||
}
|
}
|
||||||
process.emit('message', { type: 'prompt' });
|
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) {
|
if (!type) {
|
||||||
const answers = await inquirer.prompt([
|
const answers = await inquirer.prompt([
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-inula": "bin/cli.js"
|
"create-inula": "bin/cli.js"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18.0.0"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
"lib",
|
"lib",
|
||||||
|
|
Loading…
Reference in New Issue