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

Side by Side Diff: sdk/lib/_internal/dartdoc/bin/dartdoc.dart

Issue 12446003: Support full dart2js output for dartdoc/apidoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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
OLDNEW
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 print(argParser.getUsage()); 208 print(argParser.getUsage());
209 exit(1); 209 exit(1);
210 } 210 }
211 211
212 if (pkgPath == null) { 212 if (pkgPath == null) {
213 pkgPath = entrypoints[0].directoryPath.append('packages/'); 213 pkgPath = entrypoints[0].directoryPath.append('packages/');
214 } 214 }
215 215
216 cleanOutputDirectory(dartdoc.outputDir); 216 cleanOutputDirectory(dartdoc.outputDir);
217 217
218 dartdoc.documentLibraries(entrypoints, libPath, pkgPath); 218 print('Analyzing sources');
219 Future documented = dartdoc.documentLibraries(entrypoints, libPath, pkgPath);
219 220
220 Future compiled = compileScript(dartdoc.mode, dartdoc.outputDir, libPath); 221 documented.then((_) {
221 Future filesCopied = copyDirectory(scriptDir.append('../static'), 222 Future compiled = compileScript(dartdoc.mode, dartdoc.outputDir, libPath);
222 dartdoc.outputDir); 223 Future filesCopied = copyDirectory(scriptDir.append('../static'),
224 dartdoc.outputDir);
223 225
224 Future.wait([compiled, filesCopied]).then((_) { 226 Future.wait([compiled, filesCopied]).then((_) {
227 dartdoc.cleanup();
228 print('Documented ${dartdoc.totalLibraries} libraries, '
229 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} members.') ;
ahe 2013/03/05 14:48:31 Long line.
Johnni Winther 2013/03/06 08:13:11 Done.
230 });
231 }, onError: (AsyncError asyncError) {
232 print('Generation failed: ${asyncError.error}');
225 dartdoc.cleanup(); 233 dartdoc.cleanup();
226 print('Documented ${dartdoc.totalLibraries} libraries, '
227 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} members.');
228 }); 234 });
229 } 235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698