I'd love to have your help improving RouterRouter! If you'd like to pitch in, you can do so in a number of ways:
- Look through open Issues.
- Review any open Pull Requests.
- Fork RouterRouter and fix an open Issue or add your own feature.
- File new Issues if you have a good idea or see a bug and don't know how to fix it yourself. Only do this after you've made sure the behavior or problem you're seeing isn't already documented in an open Issue.
I definitely appreciate your interest in (and help improving) RouterRouter. Thanks!
RouterRouter's build process uses npm and Node.js. If you're using a Mac, the easiest way to install npm and Node.js (and plenty of other great tools) is with Homebrew:
brew install node
If you're using a different operating system, use a different package manager, or prefer not to use Homebrew, check out the Node.js Downloads page.
Contributing to RouterRouter is pretty straightforward:
- Fork the RouterRouter repo and clone it.
- Install development dependencies by running
npm install
from the root of the project. - Create a feature branch for the issue or new feature you're looking to tackle:
git checkout -b your-descriptive-branch-name
. - Run
npm start
which instructs Rollup to watchsrc/routerrouter.mjs
for changes and automatically exports built files to thedist
folder. - Write some code!
- If your changes would benefit from testing, add the necessary tests and verify everything passes by running
npm test
. - Commit your changes:
git commit -am 'Add some new feature or fix some issue'
. - Push the branch to your fork of RouterRouter:
git push origin your-descriptive-branch-name
. - Create a new Pull Request and I'll give it a look!
Excellent question. RouterRouter's source code is in the file src/routerrouter.mjs
. Make your changes here!
When you're done working (and before you push your code or issue a pull request), run npm run build
from the root of the project to recreate the files in the dist
folder. This task will generate compiled and compressed versions of the project.
Do not directly edit the files in the dist
folder!
Code styles are like opinions: Everyone's got one and yours is better than mine. Here's how RouterRouter should be written:
- Use two spaces for indentation.
- No trailing whitespace and blank lines should have whitespace removed.
- Prefer single quotes over double quotes unless interpolating.
- Follow the conventions you see in the existing source code as best as you can.
RouterRouter's formatting guidelines are defined in the .editorconfig
file which uses the EditorConfig syntax. There are a number of great plugins for a variety of editors that utilize the settings in the .editorconfig
file. Using EditorConfig will make your time spent coding a little bit easier.
Your bug fix or feature addition won't be rejected if it runs afoul of any (or all) of these guidelines, but following the guidelines will definitely make everyone's lives a little easier.