TypeScriptToLua plugin that strips calls to print, pprint, assert, and any functions attached to profiler and debug. Also replaces the statement sys.get_engine_info().is_debug with false.
The purpose is to reduce code size for production builds.
❗ Use this and any code transformation plugin with caution. Mistakes are possible.
print(foo);
pprint(foo);
assert(foo === '');
profiler.start();
debug.draw_text('');
const is_debug = sys.get_engine_info().is_debug;Becomes:
-- (This space intentionally left blank)
local is_debug = falseRequires TSTL >= 1.22.0.
- Install this plugin
yarn add tstl-remove-debug -D
# or
npm install tstl-remove-debug --save-dev- Add
tstl-remove-debugtotstl.luaPluginsintsconfig.json
{
"tstl": {
"luaPlugins": [
+ { "name": "tstl-remove-debug" }
],
}
}CC0