| Index: pkg/docgen/bin/docgen.dart
|
| diff --git a/pkg/docgen/bin/docgen.dart b/pkg/docgen/bin/docgen.dart
|
| index 862e4051a528f36500a289ffb49ec7297442dbc3..6222b0f4786b15262130e6a9151b74438b7767bc 100644
|
| --- a/pkg/docgen/bin/docgen.dart
|
| +++ b/pkg/docgen/bin/docgen.dart
|
| @@ -8,8 +8,6 @@ import 'package:args/args.dart';
|
| import 'package:logging/logging.dart';
|
|
|
| import '../lib/docgen.dart';
|
| -import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
|
| -import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart';
|
|
|
| /**
|
| * Analyzes Dart files and generates a representation of included libraries,
|
| @@ -18,8 +16,8 @@ import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
|
| void main() {
|
| logger.onRecord.listen((record) => print(record.message));
|
| var results = initArgParser().parse(new Options().arguments);
|
| - if (results["help"]) return;
|
| - new Docgen(results).analyze(listLibraries(results.rest));
|
| + if (results['help']) return;
|
| + new Docgen(results);
|
| }
|
|
|
| /**
|
| @@ -27,8 +25,8 @@ void main() {
|
| */
|
| ArgParser initArgParser() {
|
| var parser = new ArgParser();
|
| - parser.addFlag("help", abbr: "h",
|
| - help: "Prints help and usage information.",
|
| + parser.addFlag('help', abbr: 'h',
|
| + help: 'Prints help and usage information.',
|
| negatable: false,
|
| callback: (help) {
|
| if (help) {
|
| @@ -36,24 +34,24 @@ ArgParser initArgParser() {
|
| logger.info(usage);
|
| }
|
| });
|
| - parser.addFlag("verbose", abbr: "v",
|
| - help: "Output more logging information.", negatable: false,
|
| + parser.addFlag('verbose', abbr: 'v',
|
| + help: 'Output more logging information.', negatable: false,
|
| callback: (verbose) {
|
| if (verbose) Logger.root.level = Level.FINEST;
|
| });
|
| - parser.addOption("output-format", abbr: "o",
|
| - help: "Sets the output format.",
|
| - allowed: ["yaml", "json"],
|
| - allowedHelp: {"yaml" : "Outputs to YAML.",
|
| - "json" : "Outputs to JSON."});
|
| - parser.addFlag("yaml", abbr: "y",
|
| - help: "Same as output-format=yaml.", negatable: false);
|
| - parser.addFlag("json", abbr: "j",
|
| - help: "Same as output-format=json.", negatable: false);
|
| - parser.addFlag("include-private",
|
| - help: "Flag to include private declarations.", negatable: false);
|
| - parser.addFlag("include-sdk",
|
| - help: "Flag to parse SDK Library files.", negatable: false);
|
| + parser.addOption('output-format', abbr: 'o',
|
| + help: 'Sets the output format.',
|
| + allowed: ['yaml', 'json'],
|
| + allowedHelp: {'yaml' : 'Outputs to YAML. (Default)',
|
| + 'json' : 'Outputs to JSON.'});
|
| + parser.addFlag('yaml', abbr: 'y',
|
| + help: 'Same as output-format=yaml.', negatable: false);
|
| + parser.addFlag('json', abbr: 'j',
|
| + help: 'Same as output-format=json.', negatable: false);
|
| + parser.addFlag('include-private',
|
| + help: 'Flag to include private declarations.', negatable: false);
|
| + parser.addFlag('include-sdk',
|
| + help: 'Flag to parse SDK Library files.', negatable: false);
|
|
|
| return parser;
|
| }
|
|
|