OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
6 * To generate docs for a library, run this script with the path to an | 6 * To generate docs for a library, run this script with the path to an |
7 * entrypoint .dart file, like: | 7 * entrypoint .dart file, like: |
8 * | 8 * |
9 * $ dart dartdoc.dart foo.dart | 9 * $ dart dartdoc.dart foo.dart |
10 * | 10 * |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 'library names, or call this option multiple times.', | 130 'library names, or call this option multiple times.', |
131 callback: (incLibs) { | 131 callback: (incLibs) { |
132 if(!incLibs.isEmpty) { | 132 if(!incLibs.isEmpty) { |
133 List<String> allLibs = new List<String>(); | 133 List<String> allLibs = new List<String>(); |
134 for(final lst in incLibs) { | 134 for(final lst in incLibs) { |
135 var someLibs = lst.split(','); | 135 var someLibs = lst.split(','); |
136 for(final lib in someLibs) { | 136 for(final lib in someLibs) { |
137 allLibs.add(lib); | 137 allLibs.add(lib); |
138 } | 138 } |
139 } | 139 } |
140 dartdoc.excludedLibraries = allLibs; | 140 dartdoc.includedLibraries = allLibs; |
Johnni Winther
2013/04/08 13:06:23
Currently, the dartdoc testing infrastructure does
| |
141 } | 141 } |
142 }, allowMultiple: true); | 142 }, allowMultiple: true); |
143 | 143 |
144 argParser.addOption('exclude-lib', | 144 argParser.addOption('exclude-lib', |
145 help: 'Use this option to explicitly specify which\n' | 145 help: 'Use this option to explicitly specify which\n' |
146 'libraries to exclude from the documentation. If\n' | 146 'libraries to exclude from the documentation. If\n' |
147 'omitted, no libraries are excluded. Specify a\n' | 147 'omitted, no libraries are excluded. Specify a\n' |
148 'comma-separated list of library names, or call\n' | 148 'comma-separated list of library names, or call\n' |
149 'this option multiple times.', | 149 'this option multiple times.', |
150 callback: (excLibs) { | 150 callback: (excLibs) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} ' | 251 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} ' |
252 'members.'); | 252 'members.'); |
253 } | 253 } |
254 }); | 254 }); |
255 }, onError: (AsyncError asyncError) { | 255 }, onError: (AsyncError asyncError) { |
256 print('Generation failed: ${asyncError.error}'); | 256 print('Generation failed: ${asyncError.error}'); |
257 dartdoc.cleanup(); | 257 dartdoc.cleanup(); |
258 exit(1); | 258 exit(1); |
259 }); | 259 }); |
260 } | 260 } |
OLD | NEW |