tstl-trim-extensions
v2.0.0
Published
TypeScriptToLua plugin that strips the final extension from files with nested extensions
Readme
tstl-trim-extensions
TypeScriptToLua plugin that strips the final extension from files with the following file extensions:
.gui_script.ts
.render_script.ts
.script.ts
_gui_script.ts
_render_script.ts
_script.ts
v1 of this plugin could work with any nested extension, but that functionality was destroyed by TypeScriptToLua v1.36.0.
Used by @ts-defold.
Installation
- Install this plugin.
yarn add tstl-trim-extensions -D
# or
npm install tstl-trim-extensions --save-dev- Add this plugin to the
tstl.luaPluginssection oftsconfig.json.
"tstl": {
"luaPlugins": [
{
+ "name": "tstl-trim-extensions"
}
]
}Example
Files with the specific extensions mentioned above will have their final extension (.lua by default) stripped when output.
player.script.tswill be output asplayer.scriptplayer.tswill be output asplayer.luaas usual (no change).
License
MIT
