A starter kit for Screeps TypeScript-based projects, with rollup.
What are the differences from screeps-typescript-starter?
- First off, instead of using webpack, we use rollup!
- Secondly, instead of using grunt, we use gulp.
- This means we also use gulp-screeps instead of grunt-screeps.
- Third, instead of using Screeps-Typescript-Declarations, we use the strict typed-screeps.
- Lastly, we are using screeps-typescript-profiler over screeps-profiler.
- 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!
That's it. Seriously.
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
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 protected]',
password: 'password',
branch: 'dev',
ptr: false,
host: 'screeps.com',
port: 80,
secure: true
};
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)
If you want to disable profiling all together, change the value of PROFILER_ENABLED from "true" to "false" in rollup.config.js
.