editor_build 0.0.5

Dart Editor Build

This package allows a simple interaction with Dart Editor in build.dart. You can read Build.dart and the Dart Editor Build System to understand available interactions with Dart Editor.

Usage

When Dart Editor invokes build.dart

You can use the BuildOptions to parse arguments.

final opts = BuildOptions.parse(new Options().arguments);
opts.changed; // The list of files that changed and should be rebuilt.
opts.removed; // The list of files that was removed and might affect the build.
opts.clean; // bool
opts.full; // bool
opts.machine; // bool
opts.deploy; // bool

Provide results to Dart Editor

You can use BuildResult to create the output of build.dart.

final result = new BuildResult();
result.addError('foo.html', 23,'no ID found');
result.addWarning('foo.html', 24,'no ID found', charStart: 123, charEnd: 130);
result.addInfo('foo.html', 25,'no ID found');
result.addMapping('foo.html', 'out/foo.html');
print(result); // to provide information to editor

License

Apache 2.0

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  editor_build: "^0.0.5"

2. Install it

You can install packages from the command line:

$ pub get

Alternatively, your editor might support 'pub get'. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:editor_build/editor_build.dart';

Platforms

About

A simple package to interact with Dart Editor in build.dart

Author

Email alexandre.ardhuin@gmail.com Alexandre Ardhuin

Homepage

github.com/a14n/dart-editor-build

Documentation

www.dartdocs.org/documentation/editor_build/0.0.5/

Source code (hyperlinked)

www.crossdart.info/p/editor_build/0.0.5/

Uploader

alexandre.ardhuin@gmail.com

Published

Oct 7, 2014

Share