OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 * Generates the complete set of corelib reference documentation. | 6 * Generates the complete set of corelib reference documentation. |
7 */ | 7 */ |
8 #library('apidoc'); | 8 #library('apidoc'); |
9 | 9 |
10 #import('html_diff.dart'); | 10 #import('html_diff.dart'); |
11 #import('../../frog/lang.dart'); | 11 #import('../../frog/lang.dart'); |
12 #import('../../frog/file_system_node.dart'); | 12 #import('../../frog/file_system_node.dart'); |
13 #import('../../frog/file_system.dart'); | 13 #import('../../frog/file_system.dart'); |
14 #import('../dartdoc/dartdoc.dart', prefix: 'doc'); | 14 #import('../dartdoc/dartdoc.dart', prefix: 'doc'); |
15 | 15 |
16 HtmlDiff _diff; | 16 HtmlDiff _diff; |
17 | 17 |
18 void main() { | 18 void main() { |
19 var files = new NodeFileSystem(); | 19 var files = new NodeFileSystem(); |
20 parseOptions('../../frog', [] /* args */, files); | 20 parseOptions('../../frog', [] /* args */, files); |
21 initializeWorld(files); | 21 initializeWorld(files); |
22 final apidoc = new Apidoc(); | 22 final apidoc = new Apidoc(); |
| 23 apidoc.mainTitle = 'Dart API Reference'; |
| 24 |
23 HtmlDiff.initialize(); | 25 HtmlDiff.initialize(); |
24 | 26 |
25 _diff = new HtmlDiff(); | 27 _diff = new HtmlDiff(); |
26 _diff.run(); | 28 _diff.run(); |
27 world.reset(); | 29 world.reset(); |
28 | 30 |
29 apidoc.document('html'); | 31 apidoc.document('html'); |
30 } | 32 } |
31 | 33 |
32 class Apidoc extends doc.Dartdoc { | 34 class Apidoc extends doc.Dartdoc { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 "library._"; | 126 "library._"; |
125 } else if (_diff.htmlTypesToDom.containsKey(type)) { | 127 } else if (_diff.htmlTypesToDom.containsKey(type)) { |
126 var domTypes = doc.joinWithCommas( | 128 var domTypes = doc.joinWithCommas( |
127 map(_diff.htmlTypesToDom[type], _linkType)); | 129 map(_diff.htmlTypesToDom[type], _linkType)); |
128 return "_This corresponds to $domTypes in the [dart:dom](../dom.html) " + | 130 return "_This corresponds to $domTypes in the [dart:dom](../dom.html) " + |
129 "library._"; | 131 "library._"; |
130 } else { | 132 } else { |
131 return ""; | 133 return ""; |
132 } | 134 } |
133 } | 135 } |
OLD | NEW |