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

Unified Diff: sdk/lib/_internal/dartdoc/bin/dartdoc.dart

Issue 50633004: Remove uses of dart:io Options in dart2js and dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use arguments instead of args. Created 7 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 | « sdk/lib/_internal/compiler/samples/leap/leap_server.dart ('k') | utils/compiler/create_snapshot.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/dartdoc/bin/dartdoc.dart
diff --git a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
index 72c5c327b3d45956beacd410e5ceeab8fab445e9..6c3ec50ec758cd71def1385ddf6025856d4fb7be 100644
--- a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
@@ -27,20 +27,10 @@ import 'package:path/path.dart' as path;
/**
* Run this from the `lib/_internal/dartdoc` directory.
*/
-main() {
- mainWithOptions(new Options());
-}
-
-/**
- * We use this to include dartdoc in a single snapshot with dart2js.
- * (They share 90% of the code)
- */
-mainWithOptions(Options options) {
+main(List<String> arguments) {
// Need this because ArgParser.getUsage doesn't show command invocation.
final USAGE = 'Usage dartdoc [options] <entrypoint(s)>\n[options] include:';
- final args = options.arguments;
-
final dartdoc = new Dartdoc();
final argParser = new ArgParser();
@@ -197,7 +187,7 @@ mainWithOptions(Options options) {
dartdoc.dartdocPath = path.join(libPath, 'lib', '_internal', 'dartdoc');
- if (args.isEmpty) {
+ if (arguments.isEmpty) {
print('No arguments provided.');
print(USAGE);
print(argParser.getUsage());
@@ -206,7 +196,7 @@ mainWithOptions(Options options) {
final entrypoints = <Uri>[];
try {
- final option = argParser.parse(args, allowTrailingOptions: true);
+ final option = argParser.parse(arguments, allowTrailingOptions: true);
// This checks to see if the root of all entrypoints is the same.
// If it is not, then we display a warning, as package imports might fail.
« no previous file with comments | « sdk/lib/_internal/compiler/samples/leap/leap_server.dart ('k') | utils/compiler/create_snapshot.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698