-
Notifications
You must be signed in to change notification settings - Fork 0
Contribute to TJBot
TJBot: Community Edition is an open source project and contributions are welcome! This page covers the basic workflow for setting up a local development environment for hacking on TJBot's software libraries.
TJBot's TypeScript workflow is centered around a local checkout of the shared node-tjbotlib library and one or more recipe repositories that depend on it.
TJBot's Node.js library is called node-tjbotlib and is implemented in Typescript. Create a fork the node-tjbotlib repository and check it out locally. We recommend placing it under ~/.tjbot so it is easy to find and reuse across recipes.
mkdir -p ~/.tjbot
cd ~/.tjbot
git clone <your-fork-url-of-node-tjbotlib>
cd node-tjbotlibRun npm link inside node-tjbotlib so npm knows about your local copy of the package.
npm linkThis creates a global symlink for the package and makes it available to local recipes without publishing a new version.
In directory of the recipe you want to work on, link the local tjbot package name to your checkout of node-tjbotlib.
cd /path/to/your-recipe
npm link tjbotIf you are creating a new recipe, link it the same way before you start wiring code together. If you are updating an existing recipe, relink it whenever you want it to use your current local changes in node-tjbotlib.
As you make changes within node-tjbotlib, run the standard quality checks -- formatting, linting, and testing -- before you open a pull request.
npm run format
npm run lint
npm run testThese task runners keep the code formatted consistently, catches style and correctness issues, and rebuilds and runs the test suite.
TBD
Please keep pull requests focused and easy to review.
- Open or reference an issue before starting work, especially for larger changes.
- Keep the scope of each PR narrow when possible.
- Describe what changed, why it changed, and how you verified it.
- Include tests or explain why a test is not practical.
- Update documentation when the user-facing behavior changes.
- Avoid unrelated refactors in the same PR.
- Call out hardware requirements, setup changes, or migration steps in the PR description.
Use clear commit messages that explain the change. Include a Signed-off-by line in your commit or PR description to satisfy the Developer Certificate of Origin (DCO).
Example:
Signed-off-by: Your Name <you@example.com>
Use this short checklist before you submit changes:
- The code is formatted.
- Lint passes.
- Tests pass.
- Documentation is updated if behavior changed.
- The change is easy to review.
- The PR description includes any setup or verification notes the reviewer needs.
Note: If you see an issue with this Wiki, please open a Wiki issue