grinder 0.8.0 copy "grinder: ^0.8.0" to clipboard
grinder: ^0.8.0 copied to clipboard

outdatedDart 1 only

Dart workflows, automated.

Grinder #

Dart workflows, automated.

Grinder consists of a library to define project tasks (e.g. test, build, doc), and a command-line tool to run them.

pub package Build Status Build status Coverage Status

Getting Started #

To start using grinder, add it to your dev_dependencies.

Defining Tasks #

Tasks are defined entirely by Dart code allowing you to take advantage of the whole Dart ecosystem to write and debug them. Task definitions reside in a tool/grind.dart script. To create a simple grinder script, run:

pub run grinder:init

In general, grinder scripts look something like this:

import 'package:grinder/grinder.dart';

main(args) => grind(args);

@Task('Test stuff.')
test() {
  new PubApp.local('test').run([]);
}

@DefaultTask('Build the project.')
@Depends(test)
build() {
  log("Building...");
}

@Task('Generate docs.')
@Depends(test)
doc() {
  log("Generating docs...");
}

Any task dependencies (see @Depends above), are run before the dependent task.

Grinder contains a variety of convenience APIs for common task definitions, such as PubApp referenced above. See the API Documentation for full details.

Running Tasks #

First install the grind executable:

pub global activate grinder

then use it to run desired tasks:

grind test
grind build doc

or to run a default task (see @DefaultTask above):

grind

or to display a list of available tasks and their dependencies:

grind -h

or to tab-complete your tasks (thanks to unscripted):

grind --completion install
. ~/.bashrc

grind [TAB][TAB]
build  test   doc

grind b[TAB]
grind build

You can also bypass installing grind and instead use pub run grinder.

Disclaimer #

This is not an official Google product.

109
likes
0
pub points
95%
popularity

Publisher

unverified uploader

Dart workflows, automated.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

ansicolor, args, cli_util, collection, glob, path, unscripted, which

More

Packages that depend on grinder