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

Side by Side Diff: pkg/docgen/bin/docgen.dart

Issue 52573002: Remove uses of Options from pkg, samples, tests, and third_party directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Edit comment Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/csslib/test/run_all.dart ('k') | pkg/docgen/lib/docgen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 9
10 import '../lib/docgen.dart'; 10 import '../lib/docgen.dart';
11 import 'package:path/path.dart' as path; 11 import 'package:path/path.dart' as path;
12 12
13 /** 13 /**
14 * Analyzes Dart files and generates a representation of included libraries, 14 * Analyzes Dart files and generates a representation of included libraries,
15 * classes, and members. 15 * classes, and members.
16 */ 16 */
17 void main() { 17 void main(List<String> arguments) {
18 logger.onRecord.listen((record) => print(record.message)); 18 logger.onRecord.listen((record) => print(record.message));
19 var results = _initArgParser().parse(new Options().arguments); 19 var results = _initArgParser().parse(arguments);
20 20
21 docgen(results.rest.map(path.normalize).toList(), 21 docgen(results.rest.map(path.normalize).toList(),
22 packageRoot: results['package-root'], 22 packageRoot: results['package-root'],
23 outputToYaml: !results['json'], 23 outputToYaml: !results['json'],
24 includePrivate: results['include-private'], 24 includePrivate: results['include-private'],
25 includeSdk: results['parse-sdk'] || results['include-sdk'], 25 includeSdk: results['parse-sdk'] || results['include-sdk'],
26 parseSdk: results['parse-sdk'], 26 parseSdk: results['parse-sdk'],
27 append: results['append'] && new Directory('docs').existsSync(), 27 append: results['append'] && new Directory('docs').existsSync(),
28 introduction: results['parse-sdk'] ? 28 introduction: results['parse-sdk'] ?
29 'sdk-introduction.md' : results['introduction']); 29 'sdk-introduction.md' : results['introduction']);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 help: 'Sets the package root of the library being analyzed.'); 65 help: 'Sets the package root of the library being analyzed.');
66 parser.addFlag('append', 66 parser.addFlag('append',
67 help: 'Append to the docs folder, library_list.json and index.txt', 67 help: 'Append to the docs folder, library_list.json and index.txt',
68 defaultsTo: false, negatable: false); 68 defaultsTo: false, negatable: false);
69 parser.addOption('introduction', 69 parser.addOption('introduction',
70 help: 'Adds the provided markdown text file as the introduction' 70 help: 'Adds the provided markdown text file as the introduction'
71 ' for the outputted documentation.', defaultsTo: ''); 71 ' for the outputted documentation.', defaultsTo: '');
72 72
73 return parser; 73 return parser;
74 } 74 }
OLDNEW
« no previous file with comments | « pkg/csslib/test/run_all.dart ('k') | pkg/docgen/lib/docgen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698