FlutterGen / flutter_gen

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
https://pub.dev/packages/flutter_gen
MIT License
1.48k stars 150 forks source link

✨ Support build.yaml to configure #555

Closed b2nkuu closed 2 months ago

b2nkuu commented 3 months ago

What does this change?

Read config build.yaml and replacement configure after default, pubspec.yaml.

Priority of configuration file. High ---> Low build.yaml -> pubspec.yaml -> default_config

Fixes #114 🎯

Type of change

Checklist:

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

AlexV525 commented 2 months ago

Could you clarify the priority when both configs in pubspec.yaml and build.yaml exist?

b2nkuu commented 2 months ago

Could you clarify the priority when both configs in pubspec.yaml and build.yaml exist?

Yep, Priority of configuration file. High ---> Low build.yaml -> pubspec.yaml -> default_config

AlexV525 commented 2 months ago

Yep, Priority of configuration file. High ---> Low build.yaml -> pubspec.yaml -> default_config

Thanks, in this case I would like to see if we can log what configuration the gen command is using, probably like: Reading FlutterGen options from xxxx.xxx..

b2nkuu commented 2 months ago

Yep, Priority of configuration file. High ---> Low build.yaml -> pubspec.yaml -> default_config

Thanks, in this case I would like to see if we can log what configuration the gen command is using, probably like: Reading FlutterGen options from xxxx.xxx..

Got it. I will add command to select file to read and default at pubspec.yaml OK?

AlexV525 commented 2 months ago

Got it. I will add command to select file to read and default at pubspec.yaml OK?

We might focus on one specific feature in one request. Besides, we don't need such rich options AFAICT.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.55%. Comparing base (cf7b2a7) to head (c2f70f2). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #555 +/- ## ========================================== + Coverage 97.52% 97.55% +0.03% ========================================== Files 24 24 Lines 848 860 +12 ========================================== + Hits 827 839 +12 Misses 21 21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.