tstl-trim-extensions
v1.0.4
Published
TypeScriptToLua plugin that strips the final extension from files with nested extensions
Downloads
224
Readme
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.luaPlugins
section oftsconfig.json
.
"tstl": {
"luaPlugins": [
{
+ "name": "tstl-trim-extensions"
}
]
}
Update an existing TS-Defold project
- Install this plugin as described above.
- Update
TypeScriptToLua
to v1.5.0 or newer. - Remove
"trimExtensions": true
from thetstl
section 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