Skip to content

MouseTool/tfm-tstl-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfm-tstl-plugin

Provides the plugin for bundling TypeScriptToLua (TSTL) code into Transformice-compatible Lua code.

Need type definitions for Transformice? Check out tfm-tstl-types.

Install

  1. Get this package from npm
npm install -D tfm-tstl-plugin
# or
bun add --dev tfm-tstl-plugin
  1. 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"
  }
}

Compatibility

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.

About

TypeScriptToLua plugin for bundling Transformice compatible Lua code.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors