{"id":16774520,"url":"https://github.com/melonjs/typescript-boilerplate","last_synced_at":"2026-03-02T14:34:02.715Z","repository":{"id":163722865,"uuid":"638761069","full_name":"melonjs/typescript-boilerplate","owner":"melonjs","description":"A simple TypeScript x Vite based boilerplate to create games with melonJS","archived":false,"fork":false,"pushed_at":"2024-04-14T01:28:40.000Z","size":77,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T17:52:37.432Z","etag":null,"topics":["boilerplate","canvas","html5","melonjs","template","typescript","vite","webgl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/melonjs.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":"2023-05-10T03:41:21.000Z","updated_at":"2024-06-13T13:31:45.000Z","dependencies_parsed_at":"2025-02-17T23:32:54.412Z","dependency_job_id":"c787e3b2-fbfc-4287-be0b-f223b6a61e38","html_url":"https://github.com/melonjs/typescript-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonjs%2Ftypescript-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonjs%2Ftypescript-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonjs%2Ftypescript-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonjs%2Ftypescript-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melonjs","download_url":"https://codeload.github.com/melonjs/typescript-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288340,"owners_count":21078900,"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":["boilerplate","canvas","html5","melonjs","template","typescript","vite","webgl"],"created_at":"2024-10-13T06:49:23.029Z","updated_at":"2026-03-02T14:33:57.687Z","avatar_url":"https://github.com/melonjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# melonJS TypeScript Vite Boilerplate\n![melonJS Logo](https://github.com/melonjs/melonJS/raw/master/media/Banner/Banner%20-%20Billboard%20-%20Original%20Logo%20-%20horizontal.png)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/melonjs/es6-boilerplate/blob/master/LICENSE)\n\nA simple TypeScript Vite based boilerplate to create games with [melonJS](https://github.com/melonjs/melonJS), built with :\n- [melonJS 2](https://github.com/melonjs/melonJS)\n- [TypeScript](https://www.typescriptlang.org) structure and semantic\n- [Vite](https://vitejs.dev) ultra fast bundler\n- Default transpiling to ES5 using target [option](./vite.config.ts) in the Vite config file\n- Static Asset [management](https://www.npmjs.com/package/vite-plugin-static-copy) (used for the melonJS preloader)\n- Favicon support using the [vite-plugin-favicons-inject](https://www.npmjs.com/package/vite-plugin-favicons-inject) plugin\n- melonJS [debug plugin](https://github.com/melonjs/debug-plugin) to display stats on number of objects, memory usage, draw time, frame rate, etc...\n\n## Prerequisites\n\nEnsure you have [Node.js](http://nodejs.org/) installed, then install all the build dependencies in the folder where you cloned the repository :\n\n    $ [sudo] npm install\n\n## Usage\n\n- `npm run dev` to start the dev server on watch mode at `localhost:5173`.\n- `npm run build` to generate a minified, production-ready build, in the `public` folder\n\nif everything goes well, on running the dev server for the first time you should see this :\n![boilerplate-helloworld](https://user-images.githubusercontent.com/4033090/134762171-6e1fac3d-8b41-4665-890b-daa217ba61dc.png)\n\n\n## Folder structure\n\n```none\nsrc\n└── data\n│    ├── bgm\n│    ├── fnt\n|    ├── img\n|    ├── map\n|    └── sfx\n└── scripts\n|    ├── renderables\n|    └── stage\n├── index.ts\n├── index.css\n├── index.html\n├── manifest.ts\npublic\n├── data\n│    ├── bgm\n│    ├── fnt\n|    ├── img\n|    ├── map\n|    └── sfx\n├── build\n|    └── index-xxxxx.js\n└── index.html\n```\n\n- `src`\n  - the root folder for your game source code\n  - The entry file is [index.ts](src/index.ts).\n  - [index.css](src/index.css) and [index.html](src/index.html) are default templates that can be customized\n  - [manifest.ts](src/manifest.ts) is a list of asset to be preloaded by melonJS\n- `src/scripts`\n  - add your source classes here\n- `src/data`\n  - where to add your game assets\n- `public`\n  - where the production-ready build files will be copied/generated when using `npm run build`\n\nDebug plugin\n-------------------------------------------------------------------------------\nThe boilerplate include the melonJS plugin, and will automatically import and instantiate it when running under a development environement.\n\nthe Debug Panel is hidden by default and can be displayed using the \"S\" key, see [here](https://github.com/melonjs/debug-plugin/blob/main/README.md) for more details about the plugin.\n\n\nQuestions, need help ?\n-------------------------------------------------------------------------------\nIf you need technical support, you can contact us through the following channels :\n* Forums: with melonJS 2 we moved to a new discourse [forum](https://melonjs.discourse.group), but we can still also find the previous one [here](http://www.html5gamedevs.com/forum/32-melonjs/)\n* Chat: come and chat with us on [discord](https://discord.gg/aur7JMk)\n* we tried to keep our [wikipage](https://github.com/melonjs/melonJS/wiki) up-to-date with useful links, tutorials, and anything related melonJS.\n\n\nThank you and Final Note\n-------------------------------------------------------------------------------\n* Thank you @edmundg for providing a first version of this TypeScript x Vite boilerplate\n* TypeScript support in melonJS is still a work in progress, if you notice any TS definition missing you can use `@ts-ignore` to ignore the error message for a specific line, please then please report it [here](https://github.com/melonjs/melonJS/issues)\n* if you wish to request for a missing feature in the boileplate, open a ticket [here](https://github.com/melonjs/melonJS/issues) or submit a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonjs%2Ftypescript-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelonjs%2Ftypescript-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonjs%2Ftypescript-boilerplate/lists"}