yogarine / crayta-stubs
v2.1.1
2021-08-30 16:15 UTC
Requires
- php: >=7
- ext-dom: *
- ext-libxml: *
README
Crayta API 文档的 Lua stub 生成器。
Crayta 是一款免费的游戏创作游戏。去看看吧:(https://www.crayta.com)
要求
- PHP 7.0 或更高版本 (https://php.ac.cn/manual/en/install.php)
- Composer (https://getcomposer.org.cn/download/)
- Legendary (https://github.com/derrod/legendary)
安装
通过运行 composer require yogarine/crayta-stub-generator
将此包添加到您的项目中,或者使用 composer global require yogarine/crayta-stub-generator
进行全局安装。
使用
从您的项目目录中运行 vendor/bin/create-crayta-stubs
,或者如果全局安装,则运行 create-crayta-stubs
来生成 stubs。它们将被放置在当前工作目录的 stubs
子目录中。
开发
使用 Legendary 更新 LuaDocs xml 文件
-
安装并配置 Legendary (见 https://github.com/derrod/legendary#how-to-runinstall)
- 在 macOS 上的安装
brew install python3.9
pip3 install legendary-gl
- 配置
legendary auth
- 在 macOS 上的安装
-
运行
legendary list-games
获取正确的应用名称
legendary list-games
应用名称可能是一个 32 位的哈希,如
a0a49d82e3f64c1b81873397a6e92f09
。 -
使用给定的应用名称安装应用
legendary install a0a49d82e3f64c1b81873397a6e92f09
-
复制 LuaDocs。
cp -af ~/legendary/Crayta/Crayta/Content/LuaDocs/* LuaDocs/
免责声明
本项目与 Crayta、其开发者 Unit 2 Games 没有任何官方关联。Crayta 是注册商标,Crayta stubs 以及其包含的文档受 Unit 2 Games 版权保护。根据 Unit 2 Games 的服务条款,stubs 可以仅用于 Crayta 的推广。