Clone the repository and set up the development environment:
git clone https://github.com/jvalentini/bakery.git
cd bakery
make setupInstall dependencies and verify the setup:
make installThis installs all project dependencies via Bun.
Run all checks before committing:
make checkThis runs TypeScript type checking, Biome linting, and Oxlint.
Run the test suite:
make testFor continuous testing during development:
make test-watchAuto-fix linting issues where possible:
make lintBakery uses Biome for formatting and linting, with Oxlint for additional TypeScript checks. Lefthook manages git hooks that run checks automatically.
- 2-space indentation
- Single quotes
- Semicolons always
- 100 character line width
Biome automatically formats code on commit via Lefthook.
Use conventional commits validated by commitlint:
type(scope): description
Common types:
feat: New featurefix: Bug fixdocs: Documentationrefactor: Code restructuringtest: Test changeschore: Maintenance
Examples:
git commit -m "feat(cli): add new archetype option"
git commit -m "fix(generator): handle special characters in names"
git commit -m "test: add coverage for template rendering"- Create a feature branch from main
- Make changes following the development workflow
- Ensure all checks pass:
make check && make test - Push to your fork and create a pull request
- PR should include:
- Clear description of changes
- Related issues (if any)
- Test coverage for new features
- All new features must include unit tests
- Integration tests required for template generation workflows
- Maintain 80% code coverage minimum
- Run
make test-coverageto check coverage
Use Bun's test framework:
import { describe, expect, it } from 'bun:test';
describe('myFeature', () => {
it('should work correctly', () => {
expect(result).toBe(expected);
});
});
```</content>
<parameter name="filePath">/home/justin/code/bakery/CONTRIBUTING.md