No description
Find a file
2022-12-04 17:33:49 +01:00
src Initial commit 2022-12-04 17:33:49 +01:00
.gitignore Initial commit 2022-12-04 17:33:49 +01:00
package-lock.json Initial commit 2022-12-04 17:33:49 +01:00
package.json Initial commit 2022-12-04 17:33:49 +01:00
README.md Initial commit 2022-12-04 17:33:49 +01:00
rollup.config.js Initial commit 2022-12-04 17:33:49 +01:00
rollup.config.push.js Initial commit 2022-12-04 17:33:49 +01:00
screeps.example.json Initial commit 2022-12-04 17:33:49 +01:00

This is a template / example repository for using JavaScript for Screeps

To get started, install Node and run npm install in this folder

Now you can edit the source files in src/ and build using npm run build. To get faster build times (and to not manually start building all the time) you can use npm watch to start building in watch mode. This way, everytime a source code file is changed the compiler will run automatically

Your code will be compiled into a single file dist/main.js for easier uploading

Automatic uploading

To automatically upload your generated files to Screeps World or your private server, copy screeps.example.json to screeps.json and fill in your data

Then, you can run npm run push to build and upload your script. As a bonus, npm run watch-push is also available to automatically upload any changes made to the source files