| 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 * |
| 11 * Usage: | 11 * Usage: |
| 12 * | 12 * |
| 13 * $ dart apidoc.dart [--out=<output directory>] | 13 * $ dart apidoc.dart [--out=<output directory>] |
| 14 */ | 14 */ |
| 15 library apidoc; | 15 library apidoc; |
| 16 | 16 |
| 17 import 'dart:io'; | 17 import 'dart:io'; |
| 18 import 'dart:json'; | 18 import 'dart:json'; |
| 19 import 'html_diff.dart'; | 19 import 'html_diff.dart'; |
| 20 // TODO(rnystrom): Use "package:" URL (#4968). | 20 // TODO(rnystrom): Use "package:" URL (#4968). |
| 21 import '../../sdk/lib/_internal/dartdoc/lib/mirrors.dart'; | 21 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; |
| 22 import '../../sdk/lib/_internal/dartdoc/lib/mirrors_util.dart'; | 22 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; |
| 23 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart' as doc; | 23 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart' as doc; |
| 24 import '../../sdk/lib/_internal/libraries.dart'; | 24 import '../../sdk/lib/_internal/libraries.dart'; |
| 25 | 25 |
| 26 HtmlDiff _diff; | 26 HtmlDiff _diff; |
| 27 | 27 |
| 28 void main() { | 28 void main() { |
| 29 final args = new Options().arguments; | 29 final args = new Options().arguments; |
| 30 | 30 |
| 31 int mode = doc.MODE_STATIC; | 31 int mode = doc.MODE_STATIC; |
| 32 Path outputDir = new Path('docs'); | 32 Path outputDir = new Path('docs'); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 return ''' | 578 return ''' |
| 579 <div class="mdn"> | 579 <div class="mdn"> |
| 580 $mdnComment | 580 $mdnComment |
| 581 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> | 581 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> |
| 582 </div> | 582 </div> |
| 583 '''; | 583 '''; |
| 584 } | 584 } |
| 585 | 585 |
| 586 String toString() => mdnComment; | 586 String toString() => mdnComment; |
| 587 } | 587 } |
| OLD | NEW |