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

Side by Side Diff: pkg/dartdoc/lib/dartdoc.dart

Issue 10950025: Dartdoc supports package directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 var content = ''; 300 var content = '';
301 for (int i = 0; i < footerItems.length; i++) { 301 for (int i = 0; i < footerItems.length; i++) {
302 if (i > 0) { 302 if (i > 0) {
303 content = content.concat('\n'); 303 content = content.concat('\n');
304 } 304 }
305 content = content.concat('<div>${footerItems[i]}</div>'); 305 content = content.concat('<div>${footerItems[i]}</div>');
306 } 306 }
307 return content; 307 return content;
308 } 308 }
309 309
310 void documentEntryPoint(Path entrypoint, Path libPath) { 310 void documentEntryPoint(Path entrypoint, Path libPath, Path pkgPath) {
311 final compilation = new Compilation(entrypoint, libPath); 311 final compilation = new Compilation(entrypoint, libPath, pkgPath);
312 _document(compilation); 312 _document(compilation);
313 } 313 }
314 314
315 void documentLibraries(List<Path> libraryList, Path libPath) { 315 void documentLibraries(List<Path> libraryList, Path libPath, Path pkgPath) {
316 final compilation = new Compilation.library(libraryList, libPath); 316 final compilation = new Compilation.library(libraryList, libPath, pkgPath);
317 _document(compilation); 317 _document(compilation);
318 } 318 }
319 319
320 void _document(Compilation compilation) { 320 void _document(Compilation compilation) {
321 // Sort the libraries by name (not key). 321 // Sort the libraries by name (not key).
322 _sortedLibraries = new List<LibraryMirror>.from( 322 _sortedLibraries = new List<LibraryMirror>.from(
323 compilation.mirrors.libraries.getValues().filter( 323 compilation.mirrors.libraries.getValues().filter(
324 shouldIncludeLibrary)); 324 shouldIncludeLibrary));
325 _sortedLibraries.sort((x, y) { 325 _sortedLibraries.sort((x, y) {
326 return x.simpleName.toUpperCase().compareTo( 326 return x.simpleName.toUpperCase().compareTo(
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1567
1568 /** 1568 /**
1569 * Used to report an unexpected error in the DartDoc tool or the 1569 * Used to report an unexpected error in the DartDoc tool or the
1570 * underlying data 1570 * underlying data
1571 */ 1571 */
1572 class InternalError { 1572 class InternalError {
1573 final String message; 1573 final String message;
1574 const InternalError(this.message); 1574 const InternalError(this.message);
1575 String toString() => "InternalError: '$message'"; 1575 String toString() => "InternalError: '$message'";
1576 } 1576 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698