commit | 661e223861b71af4b0f686fc9f7cf6893159bb68 | [log] [tgz] |
---|---|---|
author | Phil Quitslund <pq@users.noreply.github.com> | Tue Feb 03 12:42:02 2015 -0800 |
committer | Phil Quitslund <pq@users.noreply.github.com> | Tue Feb 03 12:42:02 2015 -0800 |
tree | f0df1ec56f99d734a20c7a07246a12f72eb80345 | |
parent | 9e756916d733d9ee8f9880fb5defefc5f4e7a738 [diff] | |
parent | 545fe325baaf12a32711165ff27a80df9a71d391 [diff] |
Merge pull request #1 from dart-lang/devoncarew_readme readme tweaks
A utility 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).
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()); }
Please file feature requests and bugs at the issue tracker.