Prepare for release (dart-lang/io#15)
- Bump version to 0.2.0 - since existing package was around 0.1.0
- Added more documentation for ansi to README
diff --git a/pkgs/io/README.md b/pkgs/io/README.md
index 088d31d..bbb3a1f 100644
--- a/pkgs/io/README.md
+++ b/pkgs/io/README.md
@@ -1,10 +1,8 @@
-# io
-
Contains utilities for the Dart VM's `dart:io`.
[](https://travis-ci.org/dart-lang/io)
-## Usage
+## Usage - `io.dart`
### Files
@@ -17,7 +15,7 @@
#### `ExitCode`
-An enum-type class that contains known exit codes.
+An `enum`-like class that contains known exit codes.
#### `ProcessManager`
@@ -72,3 +70,28 @@
```
For testing, an instance of `SharedStdIn` may be created directly.
+
+## Usage - `ansi.dart`
+
+```dart
+import 'dart:io' as io;
+import 'package:io/ansi.dart';
+
+void main() {
+ // To use one style, call the `wrap` method on one of the provided top-level
+ // values.
+ io.stderr.writeln(red.wrap("Bad error!"));
+
+ // To use multiple styles, call `wrapWith`.
+ print(wrapWith('** Important **', [red, styleBold, styleUnderlined]));
+
+ // The wrap functions will simply return the provided value unchanged if
+ // `ansiOutputEnabled` is false.
+ //
+ // You can override the value `ansiOutputEnabled` by wrapping code in
+ // `overrideAnsiOutput`.
+ overrideAnsiOutput(false, () {
+ assert('Normal text' == green.wrap('Normal text'));
+ });
+}
+```
diff --git a/pkgs/io/pubspec.yaml b/pkgs/io/pubspec.yaml
index 92293fb..3045840 100644
--- a/pkgs/io/pubspec.yaml
+++ b/pkgs/io/pubspec.yaml
@@ -1,7 +1,7 @@
name: io
description: >
Utilities for the Dart VM Runtime.
-version: 0.1.0
+version: 0.2.0
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/io