lc_cli_pkg 1.0.4 copy "lc_cli_pkg: ^1.0.4" to clipboard
lc_cli_pkg: ^1.0.4 copied to clipboard

SDKDart
unlisted

Grinder tasks for releasing Dart CLI packages.

Dart CLI Packager #

This package is based on cli_pkg for secondary development, only including standalone construction

This package provides a set of Grinder tasks that make it easy to release a Dart command-line application on many different release channels, to Dart users and non-Dart users alike. It also integrates with Travis CI to make it easy to automatically deploy packages.

To use this package, import package:lc_cli_pkg/lc_cli_pkg.dart and call pkg.addAllTasks() before calling grind():

import 'package:lc_cli_pkg/lc_cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.addAllTasks();
  grind(args);
}

The following sets of tasks are provided, each of which can also be enabled individually:

  • Creating standalone archives for your package.
  • Uploading standalone archives to GitHub releases.
  • Compiling to JavaScript and publishing to npm.
  • Uploading standalone archives to Chocolatey.
  • Updating a Homebrew formula to download from GitHub releases.
  • Publishing to pub.

It's strongly recommended that this package be imported with the prefix pkg.

Configuration #

This package is highly configurable, using ConfigVariable fields defined at the top level of the library. By default, it infers as much configuration as possible from the package's pubspec, but almost all properties can be overridden in the main() method:

import 'package:lc_cli_pkg/lc_cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.name.value = "bot-name";
  pkg.humanName.value = "My App";

  pkg.addAllTasks();
  grind(args);
}

ConfigVariables whose values are expensive to compute or that might fail under some circumstances can also be set to callback functions, which are called lazily when the variables are used by the Grinder tasks:

import 'package:lc_cli_pkg/lc_cli_pkg.dart' as pkg;
import 'package:grinder/grinder.dart';

void main(List<String> args) {
  pkg.githubReleaseNotes.fn = () => File.read("RELNOTES.md");

  pkg.addAllTasks();
  grind(args);
}

Each task describes exactly which configuration variables it uses. Configuration that just applies to one set of tasks is always prefixed with a corresponding name. For example, pkg.jsFlags applies to JavaScript compilation.

0
likes
120
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

Grinder tasks for releasing Dart CLI packages.

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

archive, async, charcode, cli_util, collection, grinder, http, package_config, path, pub_semver, pubspec_parse, test, test_process, yaml

More

Packages that depend on lc_cli_pkg