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

Side by Side Diff: utils/apidoc/apidoc.dart

Issue 10867082: Fix apidoc generation of pkg on Windows (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * This generates the reference documentation for the core libraries that come 6 * This generates the reference documentation for the core libraries that come
7 * with dart. It is built on top of dartdoc, which is a general-purpose library 7 * with dart. It is built on top of dartdoc, which is a general-purpose library
8 * for generating docs from any Dart code. This library extends that to include 8 * for generating docs from any Dart code. This library extends that to include
9 * additional information and styling specific to our standard library. 9 * additional information and styling specific to our standard library.
10 * 10 *
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Add all of the core libraries. 105 // Add all of the core libraries.
106 final apidocLibraries = <Path>[]; 106 final apidocLibraries = <Path>[];
107 DART2JS_LIBRARY_MAP.forEach((String name, LibraryInfo info) { 107 DART2JS_LIBRARY_MAP.forEach((String name, LibraryInfo info) {
108 if (!info.isInternal) { 108 if (!info.isInternal) {
109 apidocLibraries.add(new Path('dart:$name')); 109 apidocLibraries.add(new Path('dart:$name'));
110 } 110 }
111 }); 111 });
112 112
113 final includedLibraries = <String>[]; 113 final includedLibraries = <String>[];
114 var lister = new Directory.fromPath( 114 var lister = new Directory.fromPath(
115 doc.scriptDir.append('../../pkg/')).list(); 115 doc.scriptDir.append('../../pkg')).list();
116 lister.onDir = (dirPath) { 116 lister.onDir = (dirPath) {
117 var path = new Path(dirPath); 117 var path = new Path.fromNative(dirPath);
118 var libname = path.filename; 118 var libname = path.filename;
119 path = path.append('${libname}.dart'); 119 path = path.append('${libname}.dart');
120 if (new File.fromPath(path).existsSync()) { 120 if (new File.fromPath(path).existsSync()) {
121 apidocLibraries.add(path); 121 apidocLibraries.add(path);
122 includedLibraries.add(libname); 122 includedLibraries.add(libname);
123 } else { 123 } else {
124 print('Warning: could not find package at $path'); 124 print('Warning: could not find package at $path');
125 } 125 }
126 }; 126 };
127 lister.onDone = (success) { 127 lister.onDone = (success) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 final typeName = member.surroundingDeclaration.simpleName; 526 final typeName = member.surroundingDeclaration.simpleName;
527 var memberName = '$typeName.${member.simpleName}'; 527 var memberName = '$typeName.${member.simpleName}';
528 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { 528 if (member is MethodMirror && (member.isConstructor || member.isFactory)) {
529 final separator = member.constructorName == '' ? '' : '.'; 529 final separator = member.constructorName == '' ? '' : '.';
530 memberName = 'new $typeName$separator${member.constructorName}'; 530 memberName = 'new $typeName$separator${member.constructorName}';
531 } 531 }
532 532
533 return a(memberUrl(member), memberName); 533 return a(memberUrl(member), memberName);
534 } 534 }
535 } 535 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698