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

Unified Diff: example/explainer/build_examples.dart

Issue 11543007: Add usage to explainer build script (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 8 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/explainer/build_examples.dart
diff --git a/example/explainer/build_examples.dart b/example/explainer/build_examples.dart
index 57b8f6aa3ba471f71fd2d37869e5a9259a9e49d3..3cf406f79559893c47fe875bc93cd257bf0e58ed 100755
--- a/example/explainer/build_examples.dart
+++ b/example/explainer/build_examples.dart
@@ -15,11 +15,19 @@ import 'package:web_ui/dwc.dart' as dwc;
main() {
var argParser = new ArgParser();
+ argParser.addFlag('help', abbr: 'h',
+ help: 'Displayes this help message', defaultsTo:false, negatable: false);
Jennifer Messerly 2012/12/12 02:02:03 nit, missing space in "defaultsTo:false" (and corr
Siggi Cherem (dart-lang) 2012/12/13 18:05:23 Done.
argParser.addOption('out', abbr: 'o',
help: 'output directory for the generated code',
defaultsTo: 'generated');
var args = argParser.parse(new Options().arguments);
+ if (args['help']) {
+ print('Usage: build_examples.dart [-o outdir] [file1, file2, ...]');
+ print(argParser.getUsage());
+ exit(0);
+ }
+
var output = args['out'];
if (args.rest.isEmpty) {
var dir = new Directory.current();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698