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 * 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 outputDir); | 109 outputDir); |
110 | 110 |
111 print('Parsing MDN data...'); | 111 print('Parsing MDN data...'); |
112 final mdnFile = new File(path.join(scriptDir, 'mdn', 'database.json')); | 112 final mdnFile = new File(path.join(scriptDir, 'mdn', 'database.json')); |
113 final mdn = JSON.decode(mdnFile.readAsStringSync()); | 113 final mdn = JSON.decode(mdnFile.readAsStringSync()); |
114 | 114 |
115 print('Cross-referencing dart:html...'); | 115 print('Cross-referencing dart:html...'); |
116 // TODO(amouravski): move HtmlDiff inside of the future chain below to re-use | 116 // TODO(amouravski): move HtmlDiff inside of the future chain below to re-use |
117 // the MirrorSystem already analyzed. | 117 // the MirrorSystem already analyzed. |
118 _diff = new HtmlDiff(printWarnings:false); | 118 _diff = new HtmlDiff(printWarnings:false); |
119 Future htmlDiff = _diff.run(currentDirectory.resolve(libPath)); | 119 Future htmlDiff = _diff.run(currentDirectory.resolveUri(path.toUri(libPath))); |
120 | 120 |
121 // TODO(johnniwinther): Libraries for the compilation seem to be more like | 121 // TODO(johnniwinther): Libraries for the compilation seem to be more like |
122 // URIs. Perhaps Path should have a toURI() method. | 122 // URIs. Perhaps Path should have a toURI() method. |
123 // Add all of the core libraries. | 123 // Add all of the core libraries. |
124 final apidocLibraries = <Uri>[]; | 124 final apidocLibraries = <Uri>[]; |
125 LIBRARIES.forEach((String name, LibraryInfo info) { | 125 LIBRARIES.forEach((String name, LibraryInfo info) { |
126 if (info.documented) { | 126 if (info.documented) { |
127 apidocLibraries.add(Uri.parse('dart:$name')); | 127 apidocLibraries.add(Uri.parse('dart:$name')); |
128 } | 128 } |
129 }); | 129 }); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 var memberName = '$typeName.${member.simpleName}'; | 469 var memberName = '$typeName.${member.simpleName}'; |
470 if (member is MethodMirror && member.isConstructor) { | 470 if (member is MethodMirror && member.isConstructor) { |
471 final separator = member.constructorName == '' ? '' : '.'; | 471 final separator = member.constructorName == '' ? '' : '.'; |
472 memberName = 'new $typeName$separator${member.constructorName}'; | 472 memberName = 'new $typeName$separator${member.constructorName}'; |
473 } | 473 } |
474 | 474 |
475 return a(memberUrl(member), memberName); | 475 return a(memberUrl(member), memberName); |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
OLD | NEW |