shell_command_generator 0.2.1 copy "shell_command_generator: ^0.2.1" to clipboard
shell_command_generator: ^0.2.1 copied to clipboard

Run shell commands as part of your build process.

pub package popularity likes pub points building

Summary #

Lightweight code generator that allows static access to the result of shell commands run at build time.

Getting started #

To use this package, add shell_command_generator as a dependency in your pubspec.yaml file.

dependencies:
  shell_command_generator_annotation: ^0.1.0

dev_dependencies:
    build_runner: ^2.0.0
    shell_command_generator: ^0.1.0
Then run `pub get` to install the package.

Usage #

In the part of your code where you want to access the result of a shell command, first add a part directive. Then add the @Shell annotation to any field, method, function, getter or variable, and provide the shell command and relevant other parameters, E.g.:

import 'package:shell_command_generator_annotation/shell_command_generator_annotation.dart';

part 'example.g.dart';

@Shell('ls', ['-l'], workingDirectory: '/path/to/directory')
const files = _$files;
0
likes
130
points
440
downloads

Publisher

verified publisherwolverinebeach.net

Weekly Downloads

Run shell commands as part of your build process.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

analyzer, build, shell_command_generator_annotation, source_gen

More

Packages that depend on shell_command_generator