{"id":18153450,"url":"https://github.com/thinknathan/tstl-export-to-global","last_synced_at":"2026-02-19T19:02:42.617Z","repository":{"id":215873421,"uuid":"739951636","full_name":"thinknathan/tstl-export-to-global","owner":"thinknathan","description":"TypeScriptToLua plugin that transforms all exported variables to global declarations","archived":false,"fork":false,"pushed_at":"2026-02-01T23:54:04.000Z","size":560,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-02T09:06:25.070Z","etag":null,"topics":["lua","tstl","tstl-extension","tstl-plugin","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinknathan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-07T03:33:30.000Z","updated_at":"2026-02-01T23:53:00.000Z","dependencies_parsed_at":"2024-01-07T04:33:04.968Z","dependency_job_id":"52220930-a486-49c8-9798-b97a4bf2225c","html_url":"https://github.com/thinknathan/tstl-export-to-global","commit_stats":null,"previous_names":["thinknathan/tstl-export-to-global"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thinknathan/tstl-export-to-global","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-to-global","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-to-global/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-to-global/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-to-global/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinknathan","download_url":"https://codeload.github.com/thinknathan/tstl-export-to-global/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-to-global/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29627701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","tstl","tstl-extension","tstl-plugin","typescript"],"created_at":"2024-11-02T03:07:05.335Z","updated_at":"2026-02-19T19:02:42.602Z","avatar_url":"https://github.com/thinknathan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tstl-export-to-global\n\n[![CI](https://github.com/thinknathan/tstl-export-to-global/actions/workflows/ci.yml/badge.svg)](https://github.com/thinknathan/tstl-export-to-global/actions/workflows/ci.yml) ![GitHub License](https://img.shields.io/github/license/thinknathan/tstl-export-to-global)\n\nTypeScriptToLua plugin that transforms all exported variables in a given file to global declarations.\n\nCan be used as an alternative to [tstl-export-as-global](https://github.com/ts-defold/tstl-export-as-global). The benefits from switching to this plugin are as follows:\n\n1. Saves allocating one table\n2. Allows you to use `export const FOO = function()` instead of `export function FOO()` if you prefer that syntax\n3. All variables are transformed, not just functions\n\n:exclamation: Use this and any code transformation plugin with caution. Mistakes are possible.\n\n## Example\n\n```lua\nlocal ____exports = {}\n____exports.foo = 10\n____exports.bar = function(self)\n\t...\nend\nreturn ____exports\n```\n\nBecomes:\n\n```lua\nfoo = 10\nfunction bar(self)\n\t...\nend\n```\n\n## Installation\n\nRequires TSTL \u003e= 1.22.0.\n\n1. Install this plugin\n\n```bash\nyarn add tstl-export-to-global -D\n# or\nnpm install tstl-export-to-global --save-dev\n```\n\n2. Add `tstl-export-to-global` to `tstl.luaPlugins` in `tsconfig.json`\n\n3. Define `match`, which will only apply the transformation to files if their _input_ (TypeScript file) path matches.\n\n```diff\n{\n\t\"tstl\": {\n\t\t\"luaPlugins\": [\n+\t\t\t{\n+\t\t\t\t\"name\": \"tstl-export-to-global\",\n+\t\t\t\t\"match\": \".*\\\\..*script.ts$\"\n+\t\t\t}\n\t\t],\n\t}\n}\n```\n\n## License\n\nCC0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknathan%2Ftstl-export-to-global","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinknathan%2Ftstl-export-to-global","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknathan%2Ftstl-export-to-global/lists"}