Mix-and-match TypeScript and Lua for your Picotron projects
| src | ||
| _G.d.ts | ||
| .gitignore | ||
| game.p64 | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
TypeScript for Picotron
This is a template project to mix-and-match TypeScript and Lua for your Picotron projects.
Setup
Requirements
Create your project
- Create a new project (i.e.
my-project) from this template - Clone
my-projectin your Picotron'sdrivefolder cd my-projectthenpnpm install- Inside Picotron:
- Open the terminal,
cd my-projectthenload game - Edit
main.luato change thecdline tocd("/my-project/build") - Run the game
- Open the terminal,
Development
pnpm devwill watch and rebuild your TypeScript code.pnpm buildis required when you change Lua code.
The resulting code is a single build/bundle.lua file.
Publish
In Picotron
> cd my-project
> load game
- Open the code inside Picotron
- Comment the
cd()line in main.lua - Save
On the host
pnpm build
In Picotron
Open the terminal:
> cp -f /my-project/build/src /ram/cart/build/src
> save
> export my-project.bin