hazzard993 / tstl-plugin-template

A small template for a new TypeScriptToLua plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScriptToLua Plugin Template

A template for TypeScriptToLua plugins.

  1. Use link to make the plugin available locally
yarn link                         # or `npm link`
  1. Head to your project (should have a package.json)
cd /path/to/project
  1. Ensure you have ts-node available
yarn add -D ts-node               # or npm install -D ts-node
  1. Link your plugin to the project
yarn link tstl-plugin-template    # or npm link tstl-plugin-template
  1. Append your plugin to your tsconfig.json
{
  "tstl": {
    "luaPlugins": [
      { "name": "tstl-plugin-template" }
    ]
  }
}
  1. 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.

About

A small template for a new TypeScriptToLua plugin


Languages

Language:TypeScript 100.0%