1.0.4 • Published 2 years ago
tstl-trim-extensions v1.0.4
tstl-trim-extensions
TypeScriptToLua plugin that strips the final extension from files with nested extensions.
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"
}
]
}Update an existing TS-Defold project
- Install this plugin as described above.
- Update
TypeScriptToLuato v1.5.0 or newer. - Remove
"trimExtensions": truefrom thetstlsection oftsconfig.json.
{
"tstl": {
- "trimExtensions": true,
}
}Example
Files with multiple nested extensions will have their final extension (.lua by default) stripped.
player.script.ts will be output as player.script
Files without multiple extensions will not be changed by this plugin.
player.ts will be output as player.lua as usual.
License
MIT