dartle 0.3.0 copy "dartle: ^0.3.0" to clipboard
dartle: ^0.3.0 copied to clipboard

outdated

A simple build system written in Dart. Tasks are declared in a regular Dart file.

Dartle #

A simple build system written in Dart.

Dartle is designed to integrate well with pub and Dart's own build system, but help with automation tasks not covered by other tools.

It is inspired by Gradle.

How to use #

Add dartle to your dev_dependencies:

pubspec.yaml

dev_dependencies:
  dartle:

Write a dartle build file

dartle.dart

import 'package:dartle/dartle.dart';

final allTasks = [Task(hello), Task(bye)];

main(List<String> args) async =>
    run(args, tasks: allTasks, defaultTasks: [allTasks[0]]);

hello() {
  print("Hello!");
}

bye() {
  print("Bye!");
}

Run your build!

Option 1: using dartle

You can use the dartle executable directly, which will snapshot your dartle.dart file and potentially run it faster.

First, activate it with pub:

pub global activate dartle

Now, simply run dartle (it will execute the dartle.dart file found in the working directory):

dartle

To run specific task(s), give them as arguments:

dartle hello bye

Output:

2019-09-09 21:00:48.079893 - dartle[main] - INFO - Running task: bye
Bye!
2019-09-09 21:00:48.086182 - dartle[main] - INFO - Build succeeded in 26 ms

Notice that the dartle executable will cache resources to make builds run faster. It uses the .dartle_tool/ directory, in the working directory, to manage the cache. You should not commit the .dartle_tool/ directory into source control.

Option 2: using dart

As dartle.dart files are simple Dart files, you can also execute them with dart, of course:

dart dartle.dart

To run specific task(s), give them as arguments:

dart dartle.dart hello bye
8
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A simple build system written in Dart. Tasks are declared in a regular Dart file.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ansicolor, args, crypto, logging, meta, path

More

Packages that depend on dartle