Provides the plugin for bundling TypeScriptToLua (TSTL) code into Transformice-compatible Lua code.
Need type definitions for Transformice? Check out tfm-tstl-types.
- Get this package from npm
npm install -D tfm-tstl-plugin
# or
bun add --dev tfm-tstl-plugin- Modify your
tsconfig.json
{
"tstl": {
"buildMode": "default",
"luaBundle": "bundle.lua",
"luaBundleEntry": "src/main.ts",
"luaPlugins": [
+ {"name": "tfm-tstl-plugin"}
],
"luaTarget": "5.2",
"luaLibImport": "require-minimal"
}
}The plugin will always have best compatibility with the version of TSTL specified under devDependencies in the package.json.
Other versions of TSTL may work, but will not guaranteed given possible API changes. This is also due to the fact that the plugin relies on undocumented hacks (e.g. regex replacement after bundling) that may not be supported over time.