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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 lister.onDone = (success) { | 139 lister.onDone = (success) { |
140 print('Generating docs...'); | 140 print('Generating docs...'); |
141 final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache, | 141 final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache, |
142 excludedLibraries); | 142 excludedLibraries); |
143 apidoc.dartdocPath = | 143 apidoc.dartdocPath = |
144 doc.scriptDir.append('../../sdk/lib/_internal/dartdoc/'); | 144 doc.scriptDir.append('../../sdk/lib/_internal/dartdoc/'); |
145 // Select the libraries to include in the produced documentation: | 145 // Select the libraries to include in the produced documentation: |
146 apidoc.includeApi = true; | 146 apidoc.includeApi = true; |
147 apidoc.includedLibraries = includedLibraries; | 147 apidoc.includedLibraries = includedLibraries; |
148 | 148 |
149 Futures.wait([copiedStatic, copiedApiDocStatic]).then((_) { | 149 Future.wait([copiedStatic, copiedApiDocStatic]).then((_) { |
150 apidoc.documentLibraries(apidocLibraries, libPath, pkgPath); | 150 apidoc.documentLibraries(apidocLibraries, libPath, pkgPath); |
151 | 151 |
152 final compiled = doc.compileScript(mode, outputDir, libPath); | 152 final compiled = doc.compileScript(mode, outputDir, libPath); |
153 | 153 |
154 Futures.wait([compiled, copiedStatic, copiedApiDocStatic]).then((_) { | 154 Future.wait([compiled, copiedStatic, copiedApiDocStatic]).then((_) { |
155 apidoc.cleanup(); | 155 apidoc.cleanup(); |
156 }); | 156 }); |
157 }); | 157 }); |
158 }; | 158 }; |
159 } | 159 } |
160 | 160 |
161 /** | 161 /** |
162 * This class is purely here to scrape handwritten HTML documentation. | 162 * This class is purely here to scrape handwritten HTML documentation. |
163 * This scraped documentation will later be merged with the generated | 163 * This scraped documentation will later be merged with the generated |
164 * HTML library. | 164 * HTML library. |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 return ''' | 589 return ''' |
590 <div class="mdn"> | 590 <div class="mdn"> |
591 $mdnComment | 591 $mdnComment |
592 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> | 592 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> |
593 </div> | 593 </div> |
594 '''; | 594 '''; |
595 } | 595 } |
596 | 596 |
597 String toString() => mdnComment; | 597 String toString() => mdnComment; |
598 } | 598 } |
OLD | NEW |