https://github.com/hazzard993/tstl-plugin-template
A small template for a new TypeScriptToLua plugin
https://github.com/hazzard993/tstl-plugin-template
plugin template typescript typescript-to-lua
Last synced: about 2 months ago
JSON representation
A small template for a new TypeScriptToLua plugin
- Host: GitHub
- URL: https://github.com/hazzard993/tstl-plugin-template
- Owner: hazzard993
- Created: 2020-10-15T03:28:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T03:29:29.000Z (over 4 years ago)
- Last Synced: 2025-02-03T08:13:56.099Z (4 months ago)
- Topics: plugin, template, typescript, typescript-to-lua
- Language: TypeScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TypeScriptToLua Plugin Template
A template for [TypeScriptToLua plugins](https://typescripttolua.github.io/docs/api/plugins).
1) Use `link` to make the plugin available locally
```sh
yarn link # or `npm link`
```2) Head to your project (should have a `package.json`)
```sh
cd /path/to/project
```3) Ensure you have `ts-node` available
```sh
yarn add -D ts-node # or npm install -D ts-node
```4) Link your plugin to the project
```sh
yarn link tstl-plugin-template # or npm link tstl-plugin-template
```5) Append your plugin to your `tsconfig.json`
```json
{
"tstl": {
"luaPlugins": [
{ "name": "tstl-plugin-template" }
]
}
}
```4) Done, run TSTL on your project and the plugin should now run
```sh
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.