Thanks for your interest in contributing to asset_opt! Here's everything you need to know to get started.
- Dart SDK >=2.19.0 <4.0.0
- Flutter (optional, for testing with Flutter projects)
- Git
-
Fork and clone the repo
git clone https://github.com/your-username/asset_opt.git cd asset_opt
-
Install dependencies
dart pub get
-
Run tests
dart test
├── bin/
│ └── asset_opt.dart # CLI entry point
│
├── lib/
│ ├── commands/ # CLI commands
│ ├── models/ # Data models
│ ├── services/ # Core services
│ ├── state/ # State management
│ ├── views/ # Terminal UI
│ └── asset_opt.dart # Public API
│
├── test/
│ ├── commands/
│ ├── models/
│ └── services/
│
├── example/
│ └── main.dart
│
└── tool/ # Development scripts
- Features:
feature/description
- Fixes:
fix/description
- Documentation:
docs/description
We follow conventional commits:
feat: add WebP conversion support
fix: correct progress bar calculation
docs: update CLI usage examples
- Run formatter before committing:
dart format .
- Follow Effective Dart guidelines
- Maintain existing patterns in the codebase
Please add tests for any new functionality:
void main() {
group('AssetAnalyzer', () {
test('should detect large images', () {
// Your test here
});
});
}
- Add dartdoc comments for public APIs
- Update README.md if adding new features
- Include example usage in doc comments
- Update your fork
- Create a feature branch
- Make your changes
- Run tests
- Create PR with description:
## Changes - Added WebP support - Improved progress reporting ## Screenshots [If applicable] ## Testing 1. Run `dart pub get` 2. Run `dart test`
- Open an issue for bugs
- Discussions for questions
- Check existing PRs for context
Look for issues labeled good first issue
or help wanted
.
- Add new optimization recommendations
- Improve error messages
- Add tests for existing features
- Update documentation
By contributing, you agree to the MIT License terms.