Contributing¶
Thank you for your interest in contributing to OCC! This page mirrors the CONTRIBUTING.md in the repository.
Getting Started¶
Prerequisites¶
- Node.js 18+
Development Setup¶
Verify Setup¶
Available Commands¶
npm run build # Compile TypeScript → dist/
npm run dev # Run via tsx (no build needed)
npm start # Run compiled output (node dist/bin/occ.js)
npm install # Install deps + auto-download scc binary
npm link # Make `occ` available globally
# Generate test fixtures
node test/create-fixtures.js
# Verify document scanning
node dist/bin/occ.js test/fixtures/
node dist/bin/occ.js --format json test/fixtures/
node dist/bin/occ.js --ci test/fixtures/
node dist/bin/occ.js --by-file test/fixtures/
node dist/bin/occ.js --structure test/fixtures/
Code Style¶
- TypeScript with strict mode — all source under
src/andbin/as.ts - ES modules (
"type": "module") throughout npm run buildcompiles todist/;npx tsxfor dev without building- No test runner or linter configured yet — contributions to add these are welcome
- Conventional Commits for commit messages
Making Changes¶
- Create a feature branch from
main - Make your changes with clear commits
- Ensure
npm run build && node dist/bin/occ.js test/fixtures/runs successfully - Update documentation if needed
- Submit a PR with a clear description
Branch Naming¶
feature/description— new featuresfix/description— bug fixesdocs/description— documentation changesrefactor/description— code refactoring
Areas for Contribution¶
- Test framework setup and test coverage
- New output formats (CSV, HTML)
- Additional document format support
- Performance improvements for large directories
- Documentation and developer experience
- Bug fixes
Look for issues labeled good first issue for newcomers.
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.