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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 doc.scriptDir.append('../../sdk/lib/_internal/dartdoc/static'), | 78 doc.scriptDir.append('../../sdk/lib/_internal/dartdoc/static'), |
79 outputDir); | 79 outputDir); |
80 | 80 |
81 // The apidoc-specific static content. | 81 // The apidoc-specific static content. |
82 final copiedApiDocStatic = doc.copyDirectory( | 82 final copiedApiDocStatic = doc.copyDirectory( |
83 doc.scriptDir.append('static'), | 83 doc.scriptDir.append('static'), |
84 outputDir); | 84 outputDir); |
85 | 85 |
86 print('Parsing MDN data...'); | 86 print('Parsing MDN data...'); |
87 final mdnFile = new File.fromPath(doc.scriptDir.append('mdn/database.json')); | 87 final mdnFile = new File.fromPath(doc.scriptDir.append('mdn/database.json')); |
88 final mdn = JSON.parse(mdnFile.readAsTextSync()); | 88 final mdn = JSON.parse(mdnFile.readAsStringSync()); |
89 | 89 |
90 print('Cross-referencing dart:html...'); | 90 print('Cross-referencing dart:html...'); |
91 HtmlDiff.initialize(libPath); | 91 HtmlDiff.initialize(libPath); |
92 _diff = new HtmlDiff(printWarnings:false); | 92 _diff = new HtmlDiff(printWarnings:false); |
93 _diff.run(); | 93 _diff.run(); |
94 | 94 |
95 // Process handwritten HTML documentation. | 95 // Process handwritten HTML documentation. |
96 print('Processing handwritten HTML documentation...'); | 96 print('Processing handwritten HTML documentation...'); |
97 final htmldoc = new Htmldoc(); | 97 final htmldoc = new Htmldoc(); |
98 htmldoc.includeApi = true; | 98 htmldoc.includeApi = true; |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 return ''' | 580 return ''' |
581 <div class="mdn"> | 581 <div class="mdn"> |
582 $mdnComment | 582 $mdnComment |
583 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> | 583 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> |
584 </div> | 584 </div> |
585 '''; | 585 '''; |
586 } | 586 } |
587 | 587 |
588 String toString() => mdnComment; | 588 String toString() => mdnComment; |
589 } | 589 } |
OLD | NEW |