{"id":18153428,"url":"https://github.com/thinknathan/tstl-export-rename","last_synced_at":"2026-02-15T12:35:22.619Z","repository":{"id":215991431,"uuid":"740210230","full_name":"thinknathan/tstl-export-rename","owner":"thinknathan","description":"TypeScriptToLua plugin that renames the `___exports` variable","archived":false,"fork":false,"pushed_at":"2024-11-01T11:55:37.000Z","size":878,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-01T12:29:03.540Z","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}},"created_at":"2024-01-07T20:48:06.000Z","updated_at":"2024-11-01T11:55:35.000Z","dependencies_parsed_at":"2024-01-30T03:49:16.650Z","dependency_job_id":"f2a2d71b-999d-4af3-a283-07b56f3f658e","html_url":"https://github.com/thinknathan/tstl-export-rename","commit_stats":null,"previous_names":["thinknathan/tstl-export-rename"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-rename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-rename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-rename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Ftstl-export-rename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinknathan","download_url":"https://codeload.github.com/thinknathan/tstl-export-rename/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222576066,"owners_count":17005444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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:00.285Z","updated_at":"2026-02-15T12:35:17.555Z","avatar_url":"https://github.com/thinknathan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tstl-export-rename\n\n[![CI](https://github.com/thinknathan/tstl-export-rename/actions/workflows/ci.yml/badge.svg)](https://github.com/thinknathan/tstl-export-rename/actions/workflows/ci.yml) ![GitHub License](https://img.shields.io/github/license/thinknathan/tstl-export-rename)\n\nTypeScriptToLua plugin that renames the `___exports` variable for cosmetic reasons.\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\nlocal M = {}\nM.foo = 10\nM.bar = function(self)\n\t...\nend\nreturn M\n```\n\n## Installation\n\nRequires TSTL \u003e= 1.22.0.\n\n1. Install this plugin\n\n```bash\nyarn add tstl-export-rename -D\n# or\nnpm install tstl-export-rename --save-dev\n```\n\n2. Add `tstl-export-rename` to `tstl.luaPlugins` in `tsconfig.json`\n\n3. Define `match`, which will only apply the transformation to files if their _output_ (Lua file) path matches.\n\n4. Define `exportRename`, which will be used to replace `___exports`\n\n```diff\n{\n\t\"tstl\": {\n\t\t\"luaPlugins\": [\n+\t\t\t{\n+\t\t\t\t\"name\": \"tstl-export-rename\",\n+\t\t\t\t\"match\": \".*\\\\..*.lua$\",\n+\t\t\t\t\"exportRename\": \"M\"\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-rename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinknathan%2Ftstl-export-rename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknathan%2Ftstl-export-rename/lists"}