build_pubspec 0.2.0+1 build_pubspec: ^0.2.0+1 copied to clipboard
Extract pubspec details (such as package version, author and description) into Dart code.
Examples #
- simple (no
build.yaml
) - custom output Dart file
- custom fields (rename fields in the output file)
- use source_gen and create a
.pubspec.g.dart
part file
How to run the examples #
cd example/{SELECT_YOUR_EXAMPLE}
pub get
pub run build_runner build
I didn't add the generated files to .gitignore
in the example folders so
that you can see the expected output even without running the examples.
However, you can consider adding generated files to .gitignore
in your project.