cli_info_builder 1.0.1 copy "cli_info_builder: ^1.0.1" to clipboard
cli_info_builder: ^1.0.1 copied to clipboard

A package that provides a builder to generate a class to pack information about a Dart CLI application.

Pub Version Dart SDK Version Pub popularity

cli_info_builder #

A package that provides a builder to generate a class to pack information about a Dart CLI application.

Usage #

  1. Add the necessary dependencies:

    dart pub add cli_info
    dart pub add dev:build_runner
    dart pub add dev:cli_info_builder
    
  2. Run a build:

    dart pub run build_runner build
    
  3. lib/gen/cli_info.dart will be generated with content:

    // coverage:ignore-file
    // GENERATED CODE - DO NOT MODIFY BY HAND
    // ignore_for_file: type=lint
    // ignore_for_file: lines_longer_than_80_chars
    
    import 'package:cli_info/cli_info.dart';
    
    const cliInfo = CliInfo(
        //...
    );
    

Optional #

To change the index of the target executable name or the path of the generated file, create a build.yaml in the root of the package and write the following:

targets:
  $default:
    builders:
      cli_info_builder:
        options:
          executables-index: 1 # default is 0
          output: "lib/gen/info.dart" # default is "lib/gen/cli_info.dart"

See also #

0
likes
140
pub points
6%
popularity

Publisher

verified publisherblendthink.dev

A package that provides a builder to generate a class to pack information about a Dart CLI application.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

build, build_config, dart_style, yaml

More

Packages that depend on cli_info_builder