Thank you for considering contributing to TuyAPI! We welcome all kinds of contributions, whether it's a small README fix or a new feature.
Please take a moment to read through this short guide so both the core maintainers' time and your time can be better utilized.
Really, anything you want that's in the scope of this project (you may also want to check out the @TuyAPI organization for other cool projects you could contribute to).
Some ideas:
- Improve documentation
- Track down bugs
- Write tutorials for new users
- Add a new feature
- Respond to new issues that are asking for support and not reporting a bug
- Improve test coverage
- Refactor and clean up existing code
Before making any major changes to a user-facing interface or adding a new feature, please open an issue with a description of the changes you're planning on making. Getting feedback before you begin programming ensures that the maintainers' time as well as yours is used more efficiently.
Before you open a Pull Request, make sure all tests pass!!!! (see next section).
You're ready to start programming? Great, here's what you should do:
- Fork this repository to your account (click the Fork button at the top right).
- Clone your forked repository to your computer with
git clone {forked repo url}
- Run
npm i
to install dependencies. - Make a new branch with
git branch
. If you're adding a new feature, use afeature-*
prefix (ex.feature-contributing
). If you're fixing a bug, use abugfix-*
prefix. Use your best judgement on anything else. - Make your changes. (Tip: you can use a file named
dev.js
as a local playground to test your new code in, since the file is ignored by Git.) - Ensure all tests pass with
npm test
. If you get a lot of style-related errors, consider runningnpx xo --fix
to automatically fix most of them. - Commit your changes with
git commit -a
. Be sure to describe the changes you've made in a clear and concise way. - Push the changes to your repo with
git push origin master
. - Open a Pull Request to the base: master branch. Click "compare across forks" and select the master branch of your fork.
Expect to hear back within a week or so (usually sooner). Thank you for your contribution!