This document contains guides on getting started with developing typed-screeps
, as well as the guidelines for contributing to this repository.
This library will stay up to date only with the help of you! If active players don't update it, it'll get lost.
The simple steps of contributing to any GitHub project are as follows:
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push -u origin my-new-feature
- Create a Pull Request!
To keep your fork of in sync with this repository, follow this guide.
To get started, just clone this repository, and install the required dependencies.
npm install
The code lives in the src/
directory. Feel free to make your changes, and when you're done, run the following command to compile them:
npm run compile
To test your changes, run the following command.
npm test
This command will compile your most recent changes, and then run linting checks. It will also test compiling against the test/typed-screeps-tests.ts
file. The tests pass if all code is lint-checked and the tests file compiles without any errors.
The test/typed-screeps-tests.ts
file also works as a sandbox for your additions. If you open this file and see no red squiggly lines, then you're good!
This codebase uses husky to auto-compile changes on commit. When you commit the changes, husky will first automatically run npm run compile
and compile your changes.
We've created a handy template for you to submit any issues with. Please use it! It will assist us in triaging your issues.
We accept almost all pull requests, provided your code passes all of the tests, and your pull request description follows the template we've set up for you.
When adding new features, don't forget to add tests for them at the dist/screeps-tests.ts
file. Likewise, don't forget to edit the readme if you are introducing any major changes or updates.
When making changes that are potentially breaking, careful discussion must be done with the community at large. Generally we do this either on the #typescript channel on the Screeps Slack, or on the corresponding pull request discussion thread.
If you are just submitting a PR, this isn't needed, but for new maintainers, when preparing a new version or updates:
- Update the changelog with links to each relevant PR
- Update the contributors list.
- Update version numbers if required
- (If releasing) Package a release / Update the relevant draft release
- Close / Update relevant issues
- (If publishing) Submit a PR to Definitely-Typed