build_cli 0.1.1
build_cli: ^0.1.1 copied to clipboard
Parse command line arguments directly into an annotation class using the power of build_runner and source_gen.
Parse command line arguments directly into an annotation class using the power of the Dart build system and source_gen.
Setup #
Add three packages to pubspec.yaml
:
dependencies:
build_cli_annotations: ^0.1.0
dev_dependencies:
build_cli: ^0.2.0
build_runner: '>=0.7.10 <0.9.0'
build_cli_annotations
is a separate package containing the annotations you add to classes and members to tellbuild_cli
what to do.- If the code you're annotating is in a published directory –
lib
,bin
– put it in thedependencies
section.
- If the code you're annotating is in a published directory –
build_cli
contains the logic to generate the code.- It should almost always be put in
dev_dependencies
.
- It should almost always be put in
build_runner
contains the logic to run a build and generate code.- It should almost always be put in
dev_dependencies
.
- It should almost always be put in
Details #
Uses package:args under the covers.
At the moment, this project is very light on documentation and tests.
The test
directory contains some
examples
for inspiration.
Also look at the
package:peanut
source code.
The bin
directory
as the interesting files.