init
Scaffold a playable JoYiHub starter work with SDK types and metadata skeleton
语法
joyihub init [directory]参数
位置参数
属性
类型
选项
属性
类型
示例
joyihub init my-game --template html响应示例
{
"directory": "/workspace/my-game",
"files": [
"index.html",
"joyihub.d.ts",
"joyihub.metadata.json"
],
"name": "my-game",
"next_steps": [
"joyihub dev --path .",
"joyihub check --path ."
],
"template": "html"
}返回字段
属性
类型
错误码
USAGE_ERROR · Exit 2
参数、取值或本地输入不合法
{
"error": {
"code": "USAGE_ERROR",
"message": "参数、取值或本地输入不合法"
}
}INIT_TARGET_EXISTS · Exit 2
目标目录已存在同名文件,需更换目录或传入 --force
{
"error": {
"code": "INIT_TARGET_EXISTS",
"message": "目标目录已存在同名文件,需更换目录或传入 --force"
}
}