Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: packages/cli_util/README.md

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/cli_util/LICENSE ('k') | packages/cli_util/codereview.settings » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/cli_util/README.md
diff --git a/packages/cli_util/README.md b/packages/cli_util/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..bcff2f3ce350015dde904fb7c28cf7130b650c5e
--- /dev/null
+++ b/packages/cli_util/README.md
@@ -0,0 +1,34 @@
+# cli_util
+
+A library to help in building Dart command-line apps.
+
+In particular, `cli_util` provides a simple, standardized way to get the current
+SDK directory. Useful, especially, when building client applications that
+interact with the Dart SDK (such as the [analyzer][analyzer]).
+
+[![Build Status](https://travis-ci.org/dart-lang/cli_util.svg)](https://travis-ci.org/dart-lang/cli_util)
+
+## Usage
+
+```dart
+import 'dart:io';
+
+import 'package:cli_util/cli_util.dart';
+import 'package:path/path.dart' as path;
+
+main(args) {
+ // Get sdk dir from cli_util
+ Directory sdkDir = getSdkDir(args);
+
+ // Do stuff... For example, print version string
+ File versionFile = new File(path.join(sdkDir.path, 'version'));
+ print(versionFile.readAsStringSync());
+}
+```
+
+## Features and bugs
+
+Please file feature requests and bugs at the [issue tracker][tracker].
+
+[analyzer]: https://pub.dartlang.org/packages/analyzer
+[tracker]: https://github.com/dart-lang/cli_util/issues
« no previous file with comments | « packages/cli_util/LICENSE ('k') | packages/cli_util/codereview.settings » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698