Skip to content

Latest commit

 

History

History
302 lines (212 loc) · 5.64 KB

File metadata and controls

302 lines (212 loc) · 5.64 KB

Contributing to Assetify

Thank you for your interest in contributing to Assetify! 🎉

🚀 Getting Started

Prerequisites

  • Flutter SDK 3.2.0 or higher
  • Dart SDK (included with Flutter)
  • Git

Development Setup

  1. Fork and Clone

    git clone https://github.com/Ionic-Errrrs-Code/assetify.git
    cd assetify
  2. Install Dependencies

    flutter pub get
    cd example && flutter pub get && cd ..
  3. Verify Setup

    dart analyze
    dart test

🛠️ Development Workflow

Making Changes

  1. Create a Feature Branch

    git checkout -b feature/your-feature-name
  2. Make Your Changes

    • Follow the existing code style
    • Add tests for new functionality
    • Update documentation as needed
  3. Test Your Changes

    # Run static analysis
    dart analyze
    
    # Run unit tests
    dart test
    
    # Test CLI manually
    dart run bin/assetify.dart generate
    
    # Test example app
    cd example
    dart run ../bin/assetify.dart generate
    flutter run
  4. Commit and Push

    git add .
    git commit -m "feat: add your feature description"
    git push origin feature/your-feature-name
  5. Create Pull Request

    • Use the GitHub web interface
    • Provide clear description of changes
    • Link to any related issues

Code Style

  • Follow Dart style guide
  • Use dart format for consistent formatting
  • Keep line length under 80 characters where reasonable
  • Use meaningful variable and function names

Commit Messages

We follow Conventional Commits:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes (no logic change)
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Maintenance tasks

Examples:

feat: add support for WebP images
fix: handle empty asset directories gracefully
docs: update README with new CLI options

🧪 Testing

Running Tests

# All tests
dart test

# Specific test file
dart test test/generator_test.dart

# With coverage
dart test --coverage=coverage

Writing Tests

  • Add tests for all new functionality
  • Test both happy path and edge cases
  • Use descriptive test names
  • Follow existing test patterns

Manual Testing

Always test the CLI commands manually:

# Test generation
dart run bin/assetify.dart generate -v

# Test watch mode (cancel with Ctrl+C)
dart run bin/assetify.dart watch

# Test with example project
cd example
dart run ../bin/assetify.dart generate
flutter run

📦 Release Process

For Maintainers

  1. Update Version

    • Update version in pubspec.yaml
    • Update CHANGELOG.md with new version and changes
    • Update version references in documentation
  2. Test Release

    dart pub publish --dry-run
  3. Create Release

    git tag v1.x.x
    git push origin v1.x.x
    dart pub publish

🐛 Bug Reports

Before Reporting

  • Search existing issues
  • Test with latest version
  • Provide minimal reproduction case

Bug Report Template

**Environment:**
- Assetify version: x.x.x
- Flutter version: x.x.x
- OS: Windows/macOS/Linux

**Description:**
Clear description of the bug

**Steps to Reproduce:**
1. Step one
2. Step two
3. Step three

**Expected Behavior:**
What should happen

**Actual Behavior:**
What actually happens

**Additional Context:**
Any other relevant information

💡 Feature Requests

Before Requesting

  • Check if feature already exists
  • Search existing feature requests
  • Consider if it fits project scope

Feature Request Template

**Problem Statement:**
What problem does this solve?

**Proposed Solution:**
How should it work?

**Alternatives Considered:**
Other approaches you've thought about

**Additional Context:**
Any other relevant information

📋 Project Structure

assetify/
├── bin/                  # CLI entry points
├── lib/
│   ├── assetify.dart    # Main library export
│   └── src/             # Implementation
├── test/                # Unit tests
├── example/             # Example Flutter app
└── docs/                # Additional documentation

Key Components

  • AssetGenerator: Core generation logic
  • PubspecReader: Pubspec.yaml parsing
  • AssetEntry/ProjectInfo: Data models
  • CLI: Command-line interface

🤝 Code of Conduct

Our Standards

  • Be respectful and inclusive
  • Welcome newcomers and help them learn
  • Focus on constructive feedback
  • Respect different viewpoints and experiences

Unacceptable Behavior

  • Harassment, discrimination, or trolling
  • Publishing private information
  • Spam or off-topic discussions
  • Any behavior inappropriate for a professional setting

🎯 Areas for Contribution

Easy Wins (Good First Issues)

  • Documentation improvements
  • Error message enhancements
  • Additional asset type support
  • CLI usability improvements

Medium Complexity

  • Performance optimizations
  • Additional output formats
  • Configuration enhancements
  • Test coverage improvements

Advanced Features

  • Plugin system
  • Custom generators
  • IDE integrations
  • CI/CD integrations

💬 Getting Help

  • Questions: Open a Discussion
  • Bugs: Open an Issue
  • Chat: Join our community discussions

🙏 Recognition

Contributors are recognized in:

  • Release notes
  • README contributors section
  • Git commit history

Thank you for making Assetify better! 🚀