{"id":15722535,"url":"https://github.com/thinknathan/def-html5-opt","last_synced_at":"2026-03-03T20:32:29.505Z","repository":{"id":214405918,"uuid":"736446757","full_name":"thinknathan/def-html5-opt","owner":"thinknathan","description":"Nodejs tool that adds loading and caching optimizations to HTML5 web games exported from Defold","archived":false,"fork":false,"pushed_at":"2026-01-25T16:40:20.000Z","size":960,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-26T09:18:16.806Z","etag":null,"topics":["defold","defold-game-engine"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":"2023-12-27T23:52:54.000Z","updated_at":"2026-01-25T16:40:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"cde106e2-98bc-4c57-a987-4430916ae9e4","html_url":"https://github.com/thinknathan/def-html5-opt","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":0.4925373134328358,"last_synced_commit":"97f121668f8bb984da76da94120d6c331a46f28d"},"previous_names":["thinknathan/def-sw","thinknathan/def-html5-opt"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/thinknathan/def-html5-opt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Fdef-html5-opt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Fdef-html5-opt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Fdef-html5-opt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Fdef-html5-opt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinknathan","download_url":"https://codeload.github.com/thinknathan/def-html5-opt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknathan%2Fdef-html5-opt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30058288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["defold","defold-game-engine"],"created_at":"2024-10-03T22:08:20.184Z","updated_at":"2026-03-03T20:32:29.465Z","avatar_url":"https://github.com/thinknathan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"_docs/def-html5-opt.png\" alt=\"Tool for Defold: Def HTML5 Opt\"\u003e\n\n# HTML5 Build Optimizer for Defold\n\n[![CI](https://github.com/thinknathan/def-html5-opt/actions/workflows/ci.yml/badge.svg)](https://github.com/thinknathan/def-html5-opt/actions/workflows/ci.yml)\n![GitHub License](https://img.shields.io/github/license/thinknathan/def-html5-opt)\n\nAdds loading and caching optimizations to HTML5 web games exported from [Defold](https://defold.com/).\n\n1. Minifies HTML and JS to reduce file size and speed loading\n2. Adds preload meta tags to speed up first boot\n3. Generates a service worker to persistently cache assets\n\n## Install\n\n1. Install [Nodejs](https://nodejs.org/en) or equivalent\n\n2. Clone this project (or fork it in Github)\n   `git clone https://github.com/thinknathan/def-html5-opt`\n\n3. Install dependencies\n   `npm i`\n   or\n   `yarn`\n\n## Usage\n\n1. Build your HTML5 export from Defold\n2. Copy your game files into the `copy-game-here` folder (don't include the build report: exclude `report.html` and similar)\n\nYou can skip any of the following steps you don't want to run. This is the recommended order:\n\n3. Run `yarn preload` or `npm run preload` to add preload meta tags\n4. Run `yarn minify` or `npm run minify` to reduce the size of `index.html` and `dmloader.js`\n5. Run `yarn sw` or `npm run sw` to generate the service worker\n\nDone! We've completed the modifications to your game in the `copy-game-here` folder.\n\nUpload all the files inside `copy-game-here` to distribute your game.\n\n## Other potential optimizations\n\nSince Defold's usage of `emscripten` lags behind the latest release, you may be able to gain an improvement to speed and/or file size by downloading the latest version of [wasm-opt](https://github.com/WebAssembly/binaryen) and running it on your wasm binary.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknathan%2Fdef-html5-opt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinknathan%2Fdef-html5-opt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknathan%2Fdef-html5-opt/lists"}