{"id":15722409,"url":"https://github.com/defold/extension-teal","last_synced_at":"2025-10-20T04:31:48.029Z","repository":{"id":224570518,"uuid":"763580628","full_name":"defold/extension-teal","owner":"defold","description":"Defold transpilation support for Teal","archived":false,"fork":false,"pushed_at":"2024-07-15T12:55:32.000Z","size":15487,"stargazers_count":29,"open_issues_count":5,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-30T15:24:38.352Z","etag":null,"topics":["defold","defold-extension","defold-library"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defold.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-02-26T15:03:44.000Z","updated_at":"2025-01-11T15:06:35.000Z","dependencies_parsed_at":"2024-05-20T11:29:39.927Z","dependency_job_id":null,"html_url":"https://github.com/defold/extension-teal","commit_stats":null,"previous_names":["defold/extension-teal"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-teal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-teal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-teal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-teal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defold","download_url":"https://codeload.github.com/defold/extension-teal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237267958,"owners_count":19282317,"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":["defold","defold-extension","defold-library"],"created_at":"2024-10-03T22:07:28.851Z","updated_at":"2025-10-20T04:31:40.237Z","avatar_url":"https://github.com/defold.png","language":"Lua","funding_links":[],"categories":["Tools"],"sub_categories":["Programming Language"],"readme":"# Teal\n\n[Teal](https://github.com/teal-language/tl) is a typed dialect of Lua. To get familiar with Teal, please have a look at \n[Teal Tutorial](https://github.com/teal-language/tl/blob/master/docs/tutorial.md).\n\n# Using teal in your project (Defold 1.8.1+)\n\n1. Add a dependency on a latest release of this extension: https://github.com/defold/extension-teal/tags\n   \n   \u003cimg width=\"401\" alt=\"image\" src=\"https://user-images.githubusercontent.com/2209596/202223571-c77f0304-5202-4314-869d-7a90bbeec5ec.png\"\u003e\n2. Fetch Libraries (`Project → Fetch Libraries`)\n3. Create `tlconfig.lua` file in the project root with the following content:\n   ```lua\n   return {\n\t    gen_target = \"5.1\",\n\t    gen_compat = \"off\",\n\t    include = {\"**/*.tl\"}\n   }\n   ```\n4. Create `.tl` files — those can be required from scripts and lua modules as if they were `.lua` files \n\n# Examples\n\n## Hello world\n\nWith Teal extension added to the project dependency list and `/tlconfig.lua` file in the project root, we can start using \nteal. Assuming you are using an empty project template to try it out, here is how you can start using it:\n\n1. Create a file in the `main` folder and name it `greeter.tl`, then write the following code:\n   ```lua\n   -- this is Teal, note the type annotations:\n   local template: string = \"Hello, %s!\"\n   \n   local M = {}\n   \n   function M.greet(s: string): string\n      return template:format(s)\n   end\n   \n   return M\n   ```\n2. Create `main.script` file in the `main` directory, set it's content to this:\n   ```lua\n   -- we are importing the Teal file as if it was Lua\n   local greeter = require(\"main.greeter\")\n   \n   function init(self)\n       -- use the Teal module\n       print(greeter.greet(\"Teal\"))\n   end\n   ```\n3. In `main.collection` file, add a `main.script` Script as a component to some game object.\n4. Run the game. The build process will compile and type check all Teal code, and you will \n   see the following line in the output:\n   ```\n   DEBUG:SCRIPT: Hello, Teal!\n   ```\n\n# Developing this extension\n\nIf you modify teal executable, re-assemble the bin zips:\n```shell\n./make-binaries.sh\n```\n\nIf you modify extension code (Java), recompile the jar before commit:\n```shell\n./build_plugin.sh\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefold%2Fextension-teal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefold%2Fextension-teal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefold%2Fextension-teal/lists"}