TypeScriptToLua npm 集成玩法

TypeScriptToLua npm 集成要求

格式&限制

  • 不能包含.ts 以及.tsx 源文件
  • 必须使用buildMode为library
  • 推荐添加declaration true
  • 不能使用luaBundle 做为包依赖
  • package.json 格式定义main 以及types ,需要使用相对路径,同时不能包含文件扩展

参考图

 

 

说明

基于npm 的lua 模块管理是一个不错的模式,但是在集成的时候会有包查找的问题,可以基于lua_path 以及lua_cpath 解决,但是目前来说并不是
特别好,看了github issue 官方也在计划调整中

参考资料

https://github.com/TypeScriptToLua/TypeScriptToLua
https://typescripttolua.github.io/docs/configuration
https://typescripttolua.github.io/docs/publishing-modules
https://www.lua.org/manual/5.1/manual.html
https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1118
https://github.com/TypeScriptToLua/TypeScriptToLua/pull/1241

posted on   荣锋亮  阅读(96)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2021-04-17 streamsets http client 请求过大问题
2021-04-17 使用graalvm 运行cube.js
2021-04-17 使用presto-gateway 进行trino 扩展
2021-04-17 trino 兼容presto 的方法
2020-04-17 ff4j 特性开关功能开发的一些实践理论
2020-04-17 java 几个不错的特性开关框架
2018-04-17 k8s helm 私服chartmuseum minio s3 存储配置

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示