Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ts-defold/tsd-template
Boilerplate TypeScript template with @ts-defold
https://github.com/ts-defold/tsd-template
defold defold-game game-development lua ts-defold-template typescript
Last synced: about 2 months ago
JSON representation
Boilerplate TypeScript template with @ts-defold
- Host: GitHub
- URL: https://github.com/ts-defold/tsd-template
- Owner: ts-defold
- License: mit
- Created: 2020-10-09T17:00:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T03:12:12.000Z (about 2 months ago)
- Last Synced: 2024-10-25T09:48:46.467Z (about 2 months ago)
- Topics: defold, defold-game, game-development, lua, ts-defold-template, typescript
- Language: TypeScript
- Homepage: https://ts-defold.dev
- Size: 361 KB
- Stars: 17
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Defold TypeScript Template (minimal)
A dev environment for [Defold](https://defold.com/) that transpiles TypeScript into lua using [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua).
## Features
- Full Lua and Defold API type definitions for TypeScript auto-complete and type checking
- Library of types for Defold extensions via `npm run resolve`
- Eslint config for handling the caveats of TypeScriptToLua and keeping your code correct
- Handles script, gui_script, and module exports using familiar ES6 export syntax
- Full BoilerPlate game project ready to transpile and go
- File watcher via `npm run dev` to transpile on save_Note that you will need to have [Node.js](https://nodejs.org) installed._
## Quick Start
- Use `npm run dev` to start a watcher that compiles and emits lua and script when you save
- Use `npm run build` to just compile your ts, sans watcher## Installation
1. Fork this template or use [degit](https://www.npmjs.com/package/degit) to download the template locally
```bash
npx degit ts-defold/tsd-template my-game
# or
git clone https://github.com/ts-defold/tsd-template.git my-game
```2. Initialize
```bash
cd my-game
npm install
```3. Generate
```bash
npm run build # Transpile the TypeScript files to lua
# or
npm run dev # Watch for changes and regenerate files on save
```4. Code
```
code .
```5. Open `app/game.project` in Defold
- Start making games with TypesScript!
TypeScript :heart: Defold