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

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

Issue 10827227: Start moving non-platform libraries from lib/ to pkg/ . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 * 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // TODO(johnniwinther): Libraries for the compilation seem to be more like 103 // TODO(johnniwinther): Libraries for the compilation seem to be more like
104 // URIs. Perhaps Path should have a toURI() method. 104 // URIs. Perhaps Path should have a toURI() method.
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 apidocLibraries.add(doc.scriptDir.append('../../lib/unittest/unittest.dart')); 112 apidocLibraries.add(doc.scriptDir.append('../../lib/unittest/unittest.dart'));
113 apidocLibraries.add(doc.scriptDir.append('../../lib/i18n/intl.dart')); 113 apidocLibraries.add(doc.scriptDir.append('../../pkg/i18n/intl.dart'));
114 apidocLibraries.add(doc.scriptDir.append('../../pkg/logging/logging.dart'));
114 115
115 print('Generating docs...'); 116 print('Generating docs...');
116 final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache); 117 final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache);
117 // Select the libraries to include in the produced documentation: 118 // Select the libraries to include in the produced documentation:
118 apidoc.includeApi = true; 119 apidoc.includeApi = true;
119 apidoc.includedLibraries = <String>[ 120 apidoc.includedLibraries = <String>[
120 'unittest', 121 'unittest',
121 'intl', 122 'intl',
122 ]; 123 ];
123 124
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 final typeName = member.surroundingDeclaration().simpleName(); 516 final typeName = member.surroundingDeclaration().simpleName();
516 var memberName = '$typeName.${member.simpleName()}'; 517 var memberName = '$typeName.${member.simpleName()}';
517 if (member is MethodMirror && (member.isConstructor || member.isFactory)) { 518 if (member is MethodMirror && (member.isConstructor || member.isFactory)) {
518 final separator = member.constructorName == '' ? '' : '.'; 519 final separator = member.constructorName == '' ? '' : '.';
519 memberName = 'new $typeName$separator${member.constructorName}'; 520 memberName = 'new $typeName$separator${member.constructorName}';
520 } 521 }
521 522
522 return a(memberUrl(member), memberName); 523 return a(memberUrl(member), memberName);
523 } 524 }
524 } 525 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698