BirjuVachhani / spider

A small dart library to generate Assets dart code from assets folder.
https://spider.birju.dev/
Apache License 2.0
190 stars 19 forks source link

Fix/Package related asset paths are legit now #65

Closed Aqluse closed 1 year ago

Aqluse commented 2 years ago

Description of the Change

Fulfills issue given https://github.com/BirjuVachhani/spider/issues/64 more precisely that kind of paths https://docs.flutter.dev/development/ui/assets-and-images#bundling-of-package-assets

Alternate Designs

No alternatives considered.

Why Should This Be In Core?

As this kind of asset paths are legit in Dart ecosystem.

Benefits

Ability to use the generator with package assets.

Possible Drawbacks

No imminent drawbacks are expected.

Verification Process

I have run the generator for package and direct asset paths both. Output paths are whole being generated as expected.

Just verified it by running generator for direct asset paths might be impacted by following changes. No other checks have been executed.

Applicable Issues

https://github.com/BirjuVachhani/spider/issues/64

BirjuVachhani commented 2 years ago

@Aqluse Thank you for the PR! This looks good. I'll test it out later. Can you please add some tests for this?

codecov-commenter commented 2 years ago

Codecov Report

Merging #65 (446a5d4) into main (dd61a57) will increase coverage by 0.07%. The diff coverage is 81.81%.

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   57.75%   57.82%   +0.07%     
==========================================
  Files          31       31              
  Lines         722      728       +6     
==========================================
+ Hits          417      421       +4     
- Misses        305      307       +2     
Impacted Files Coverage Δ
lib/src/cli/utils/constants.dart 50.00% <ø> (ø)
lib/src/dart_class_generator.dart 81.28% <75.00%> (-0.69%) :arrow_down:
lib/src/cli/utils/helpers.dart 95.00% <100.00%> (+0.17%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Aqluse commented 2 years ago

@BirjuVachhani Unfortunately I am quite busy in nearest future.

BirjuVachhani commented 2 years ago

@Aqluse Can you provide me information about how to use it? I wanna test it with this asset package: https://pub.dev/packages/country_icons

BirjuVachhani commented 1 year ago

@Aqluse Seems like build is failing because of code formatting.

BirjuVachhani commented 1 year ago

Available in v4.1.0