Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.55 KB

File metadata and controls

60 lines (41 loc) · 1.55 KB

🚀 screeps-typescript-rocket-starter

This is a modern and clean project template for a new Screeps project in Typescript.

Features:

Requirements

  • Bun must be installed

Getting started

To install dependencies:

$ bun install

To run linting:

$ bun lint

To auto format code (and write the changes):

$ bun format

To run tests:

(Note it's important to preload the setup script in ./src/test/setup.ts to create globals like Game, Memory etc. from screeps-jest which is why bun run test is preferred over bun test here.)

$ bun run test

To push to screeps:

  1. First create screeps.json with your screeps credentials. See screeps.sample.json for an example.
  2. Run bun push-main to push to your main branch on screeps.com.

Alternatively run bun watch-main to watch for changes in your code as you edit and push on demand.

Extending the template

Note: Although bun build runs significantly faster than tsc for a large codebase, the build from bun is not currently able to target the slightly old node runtime that Screeps runs on. For this reason we still use a vanilla tsc compile step in the rollup script.