A template for TypeScriptToLua plugins.
- Use
link
to make the plugin available locally
yarn link # or `npm link`
- Head to your project (should have a
package.json
)
cd /path/to/project
- Ensure you have
ts-node
available
yarn add -D ts-node # or npm install -D ts-node
- Link your plugin to the project
yarn link tstl-plugin-template # or npm link tstl-plugin-template
- Append your plugin to your
tsconfig.json
{
"tstl": {
"luaPlugins": [
{ "name": "tstl-plugin-template" }
]
}
}
- Done, run TSTL on your project and the plugin should now run
npx tstl -p tsconfig.json
Once this setup is complete you can continue to adjust plugin.ts
and source files in your project to adjust what your plugin does.