| OLD | NEW |
| 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 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
| 10 | 10 |
| 11 // Must use relative paths because library imports mirrors via relative paths |
| 11 import '../lib/docgen.dart'; | 12 import '../lib/docgen.dart'; |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * Analyzes Dart files and generates a representation of included libraries, | 15 * Analyzes Dart files and generates a representation of included libraries, |
| 15 * classes, and members. | 16 * classes, and members. |
| 16 */ | 17 */ |
| 17 void main(List<String> arguments) { | 18 void main(List<String> arguments) { |
| 18 var options = _initArgParser().parse(arguments); | 19 var options = _initArgParser().parse(arguments); |
| 19 var files = options.rest.map(path.normalize).toList(); | 20 var files = options.rest.map(path.normalize).toList(); |
| 20 if (files.isEmpty) _printHelpAndExit(); | 21 if (files.isEmpty) _printHelpAndExit(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 defaultsTo: null); | 150 defaultsTo: null); |
| 150 parser.addOption('start-page', | 151 parser.addOption('start-page', |
| 151 help: 'By default the viewer will start at the SDK introduction page. ' | 152 help: 'By default the viewer will start at the SDK introduction page. ' |
| 152 'To start at some other page, e.g. for a package, provide the name ' | 153 'To start at some other page, e.g. for a package, provide the name ' |
| 153 'of the package in this argument, e.g. --start-page=intl will make ' | 154 'of the package in this argument, e.g. --start-page=intl will make ' |
| 154 'the start page of the viewer be the intl package.', | 155 'the start page of the viewer be the intl package.', |
| 155 defaultsTo: null); | 156 defaultsTo: null); |
| 156 | 157 |
| 157 return parser; | 158 return parser; |
| 158 } | 159 } |
| OLD | NEW |