Thank you for your interest in contributing to optimg! This document provides guidelines and information for contributors.
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive criticism
- Respect differing viewpoints and experiences
Before creating an issue, please:
- Check existing issues to avoid duplicates
- Use the issue templates when available
- Provide detailed information:
- Node.js version
- Operating system
- Complete error messages
- Steps to reproduce
- Expected vs actual behavior
We welcome feature suggestions! Please:
- Check if the feature has already been suggested
- Explain the use case and benefits
- Provide examples of how it would work
- Consider implementation complexity
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make sure your code follows our style guidelines
- Write or update tests for your changes
- Update documentation if needed
We use ESLint with Standard configuration:
npm run lint # Check for style issues
npm run lint:fix # Auto-fix style issuesAll contributions must include tests:
npm test # Run all tests
npm run test:coverage # Run tests with coverage reportUse clear, descriptive commit messages:
feat: add AVIF format support
fix: handle corrupted JPEG files gracefully
docs: update installation instructions
test: add unit tests for config validation
- Update the README.md with details of changes if applicable
- Ensure all tests pass and coverage remains high
- Update the CHANGELOG.md with your changes
- Request review from maintainers
- Address review feedback promptly
- Node.js >= 18.0.0
- npm or yarn
# Clone your fork
git clone https://github.com/yourusername/optimg-cli.git
cd optimg-cli
# Install dependencies
npm install
# Run tests
npm test
# Run linting
npm run lint
# Test CLI locally
npm link
optimg --helpoptimg-cli/
├── src/ # Core library code
│ ├── index.js # Main ImageOptimizer class
│ └── config.js # Configuration and presets
├── bin/ # CLI entry point
│ └── cli.js # Command-line interface
├── test/ # Test files
├── docs/ # Documentation
└── examples/ # Usage examples
- Performance optimizations: Faster processing, better memory usage
- Format support: Additional input/output formats
- Error handling: Better error messages and recovery
- Testing: Increase test coverage, add integration tests
- Documentation: More examples, tutorials, API docs
- Configuration: More preset options, custom profiles
- CLI improvements: Better progress indicators, interactive mode
- Integration: CI/CD templates, Docker support
- GUI: Desktop application wrapper
- Web interface: Browser-based tool
- Plugins: Extensible architecture for custom processors
Feel free to:
- Open an issue for questions
- Join discussions in existing issues
- Contact maintainers directly
Contributors will be recognized in:
- The project README
- Release notes
- GitHub contributors page
Thank you for helping make optimg better!