diff --git a/test.lua b/test.lua new file mode 100644 index 0000000..2cbab27 --- /dev/null +++ b/test.lua @@ -0,0 +1,7 @@ +--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] +menu.add_feature( + "test", + "action", + 0, + function() return ui.notify_above_map("Hello from TypeScript", "", 140) end +) diff --git a/ts-lua/dist/test.lua b/ts-lua/dist/test.lua index fc4b945..2cbab27 100644 --- a/ts-lua/dist/test.lua +++ b/ts-lua/dist/test.lua @@ -3,7 +3,5 @@ menu.add_feature( "test", "action", 0, - function() - ui.notify_above_map("test", "test tile", 140) - end + function() return ui.notify_above_map("Hello from TypeScript", "", 140) end ) diff --git a/ts-lua/package.json b/ts-lua/package.json index d467f3b..67276c3 100644 --- a/ts-lua/package.json +++ b/ts-lua/package.json @@ -1,7 +1,8 @@ { "private": true, "scripts": { - "build": "tstl", + "build": "tstl && npm run post-build", + "post-build": "cp dist/test.lua ../test.lua", "dev": "tstl --watch" }, "devDependencies": { diff --git a/ts-lua/src/test.ts b/ts-lua/src/test.ts index 2a62371..2e9d943 100644 --- a/ts-lua/src/test.ts +++ b/ts-lua/src/test.ts @@ -1 +1,2 @@ -menu.add_feature('test', 'action', 0, () => ui.notify_above_map('from TypeScript', 'Hello', 140)) \ No newline at end of file +menu.add_feature('test', 'action', 0, () => + ui.notify_above_map('Hello from TypeScript', '', 140))