https://github.com/hazzard993/love-typescript-template
  
  
    A template project to get started with a TypeScript LÖVE 2D project 
    https://github.com/hazzard993/love-typescript-template
  
love2d template template-project typescript
        Last synced: 4 months ago 
        JSON representation
    
A template project to get started with a TypeScript LÖVE 2D project
- Host: GitHub
- URL: https://github.com/hazzard993/love-typescript-template
- Owner: hazzard993
- License: mit
- Created: 2019-02-19T23:54:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T03:56:46.000Z (about 1 year ago)
- Last Synced: 2025-04-12T08:29:12.282Z (7 months ago)
- Topics: love2d, template, template-project, typescript
- Language: TypeScript
- Homepage:
- Size: 310 KB
- Stars: 37
- Watchers: 2
- Forks: 3
- Open Issues: 2
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # LÖVE 2D TypeScript Project Template
A template LÖVE 2D TypeScript Project made possible with [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua).
You can click `Use this template` to clone this repo, or download it as a zip.
## Scripts
Requires [NodeJS](https://nodejs.org/en/download/) and [LÖVE 2D](https://love2d.org/) within your CLI.
| Command                | Description                                      |
| ---------------------- | ------------------------------------------------ |
| `npm install`          | ⏬ Install dependencies                          |
| `npm run build`        | 🔨 Build everything                              |
| `npm run watch`        | 🔨x♾ Re-build Lua files when a TS file is saved |
| `npm start`            | 🎮 Start the game                                |
| `npm run fix:prettier` | 💄 Fixes linting issues                          |
| `npm run lint`         | 💄 Checks for linting issues in code             |
To distribute the game, see the [game distribution wiki page](https://love2d.org/wiki/Game_Distribution).
External files can be placed in `res/` and referenced with `res/`.
e.g.
```ts
love.filesystem.read("res/input.txt");
```
### Notes
- If you're using VS Code, the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension will automatically format your code for you so you don't need to run `npm run fix:prettier` on every change.
- Index your arrays at 0 in your source code.
- Lua does not iterate over sparse arrays (arrays with no values in the middle of them).
### Links
- [TypeScriptToLua Wiki](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki)
  - [Writing Declarations](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki/Writing-Declarations)
  - [Compiler Directives](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki/Compiler-Directives)
- [LÖVE 2D Wiki](https://love2d.org/wiki/Main_Page)
- [LÖVE 2D - Getting Started](https://love2d.org/wiki/Getting_Started)