Skip to content

A starter kit for Screeps TypeScript-based projects, with rollup.

License

Notifications You must be signed in to change notification settings

lurr/screeps-typescript-starter-rollup

Repository files navigation

screeps-typescript-starter-rollup Build Status

A starter kit for Screeps TypeScript-based projects, with rollup.


What are the differences from screeps-typescript-starter?

Features

  • Automatic upload of your code via. gulp push
  • Automatic tree-shaking of your code - no more useless, dead code!
  • An easy-to-use profiler.
  • Automatic source-map generation.
  • Error Mapping, so you know exactly where that one error is!

Requirements

That's it. Seriously.

Setup

Installing the required packages

Run the following to setup the environment in the working directory

$ npm install

NOTE: You may optionally install gulp globally with npm install gulp -g

Set up your credentials

Create a copy of screeps.example.js and call it screeps.js NOTE: This contains your credentials. Do not commit this at all costs! This is covered in the default .gitignore, so never remove it.

In the new file, change email, password, branch, host, port and secure to your liking.

Example:

module.exports = {
    email: 'email@email.com',
    password: 'password',
    branch: 'dev',
    ptr: false,
    host: 'screeps.com',
    port: 80,
    secure: true
};

Building your code

To build, tree-shake & rollup your code run:

$ npm run build

(you can also use gulp build if you have it installed globally)

To build, tree-shake, rollup, and deploy, run:

$ npm run deploy

(you can also use gulp push if you have it installed globally)

Extra Notes

If you want to disable profiling all together, change the value of PROFILER_ENABLED from "true" to "false" in rollup.config.js.

About

A starter kit for Screeps TypeScript-based projects, with rollup.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published