This is a typescript template for screeps and bun
-
Clone this repository
-
Install the requirements
bun install
To build the project run the build
script
bun run build
A watch
script is available as well
The compiled output will be available in dist/main.js
The main loop is found in src/index.ts
Put prototypes into src/prototypes/...
and add an import to src/prototypes/index.ts
Put prototype type definitions either into src/types.d.ts
or into the respective prototype file
You can see an exmaple in src/prototypes/Creep.ts
There are utilities available in src/util
if you need any.
You can import them directly or from the src/util/index.ts
as they are re-exported there as well.
This template was inspired by screepers/screeps-typescript-starter