| 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 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 introFileName: introduction, | 48 introFileName: introduction, |
| 49 out: options['out'], | 49 out: options['out'], |
| 50 excludeLibraries: excludedLibraries, | 50 excludeLibraries: excludedLibraries, |
| 51 includeDependentPackages: options['include-dependent-packages'], | 51 includeDependentPackages: options['include-dependent-packages'], |
| 52 compile: options['compile'], | 52 compile: options['compile'], |
| 53 serve: options['serve'], | 53 serve: options['serve'], |
| 54 dartBinary: dartBinary, | 54 dartBinary: dartBinary, |
| 55 pubScript: pubScript, | 55 pubScript: pubScript, |
| 56 noDocs: options['no-docs'], | 56 noDocs: options['no-docs'], |
| 57 startPage: startPage, | 57 startPage: startPage, |
| 58 indentJSON: indentJSON); | 58 indentJSON: indentJSON, |
| 59 sdk: options['sdk']); |
| 59 } | 60 } |
| 60 | 61 |
| 61 /** | 62 /** |
| 62 * Print help if we are passed the help option or invalid arguments. | 63 * Print help if we are passed the help option or invalid arguments. |
| 63 */ | 64 */ |
| 64 void _printHelpAndExit() { | 65 void _printHelpAndExit() { |
| 65 print(_initArgParser().usage); | 66 print(_initArgParser().usage); |
| 66 print('Usage: dartdocgen [OPTIONS] fooDir/barFile'); | 67 print('Usage: dartdocgen [OPTIONS] fooDir/barFile'); |
| 67 exit(0); | 68 exit(0); |
| 68 } | 69 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 'To start at some other page, e.g. for a package, provide the name ' | 147 'To start at some other page, e.g. for a package, provide the name ' |
| 147 'of the package in this argument, e.g. --start-page=intl will make ' | 148 'of the package in this argument, e.g. --start-page=intl will make ' |
| 148 'the start page of the viewer be the intl package.', | 149 'the start page of the viewer be the intl package.', |
| 149 defaultsTo: null); | 150 defaultsTo: null); |
| 150 parser.addFlag('indent-json', | 151 parser.addFlag('indent-json', |
| 151 help: 'Indents each level of JSON output by two spaces', | 152 help: 'Indents each level of JSON output by two spaces', |
| 152 defaultsTo: false, negatable: true); | 153 defaultsTo: false, negatable: true); |
| 153 | 154 |
| 154 return parser; | 155 return parser; |
| 155 } | 156 } |
| OLD | NEW |