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

Unified Diff: pkg/docgen/bin/docgen.dart

Issue 18438003: Removed ArgResult in lib/docgen.dart and removed top level variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | pkg/docgen/lib/docgen.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/bin/docgen.dart
diff --git a/pkg/docgen/bin/docgen.dart b/pkg/docgen/bin/docgen.dart
index df6ce632d55f20297103d3a7db5b599122fe06e3..00ea862d40041282e8bbd8649a7e57b327447f24 100644
--- a/pkg/docgen/bin/docgen.dart
+++ b/pkg/docgen/bin/docgen.dart
@@ -16,8 +16,12 @@ import '../lib/docgen.dart';
void main() {
logger.onRecord.listen((record) => print(record.message));
var results = initArgParser().parse(new Options().arguments);
- if (results['help']) return;
- docgen(results);
+ docgen(results.rest, packageDir: results['package-root'],
Andrei Mouravski 2013/07/02 00:58:29 Move packageDir: ... to the next line.
Andrei Mouravski 2013/07/02 00:58:29 Also, I think packageDir should be changed to pack
janicejl 2013/07/02 01:21:31 Done.
+ outputToYaml: results['yaml'] || results['output-format'] == 'yaml',
Andrei Mouravski 2013/07/02 00:58:29 Create a var above this to hold this info.
janicejl 2013/07/02 01:21:31 Done.
+ outputToJson: results['json'] || results['output-format'] == 'json',
Andrei Mouravski 2013/07/02 00:58:29 Get rid of outputToJson, since it's a negation.
janicejl 2013/07/02 01:21:31 Done.
+ includePrivate: results['include-private'],
+ includeSdk: results['parse-sdk'] || results['include-sdk'],
+ parseSdk: results['parse-sdk']);
}
/**
@@ -32,6 +36,7 @@ ArgParser initArgParser() {
if (help) {
logger.info(parser.getUsage());
logger.info(USAGE);
+ exit(0);
Andrei Mouravski 2013/07/02 00:58:29 Throw an exception instead.
janicejl 2013/07/02 01:21:31 If I throw an exception, wouldn't it cause a stack
Andrei Mouravski 2013/07/02 02:21:44 Yeah, but I'd also move the help logging stuff to
janicejl 2013/07/02 17:18:51 I decided to keep it in the callback so that all t
}
});
parser.addFlag('verbose', abbr: 'v',
« no previous file with comments | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | pkg/docgen/lib/docgen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698