Skip to content
pubscout

grinder

0.10.2, released 4 weeks ago by sass-lang.com

A task runner for Dart to define and automate project workflows.

$ flutter pub add grinder
Source repository

What it does

Grinder helps developers define project tasks like building, testing, and deploying entirely in Dart code. It provides a command-line tool to run these tasks with support for dependencies, default tasks, and command-line arguments.

AI-written summary of version 0.10.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to write build and automation scripts in Dart instead of shell scripts or Makefiles.
  • Your project requires ordered task dependencies like running tests only after a successful build.

Skip it when

  • You prefer external build tools or standard shell scripts for workflow automation.

Strengths

  • Allows leveraging the full Dart ecosystem to write and debug task definitions.
  • Supports task dependencies and passing command-line flags and options.

Weaknesses

  • Requires maintaining task scripts inside a `tool/grind.dart` file.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
5

Add grinder to dev_dependencies and run `dart run grinder:init` to create a grinder script.

import 'package:grinder/grinder.dart';

main(args) => grind(args);

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

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

Works with

Packages commonly used together with grinder: ones it builds on, ones built on it, and its own family.