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:async'; | 17 import 'dart:async'; |
18 import 'dart:io'; | 18 import 'dart:io'; |
19 import 'dart:json' as json; | 19 import 'dart:json' as json; |
20 import 'dart:uri'; | |
21 | 20 |
22 import 'html_diff.dart'; | 21 import 'html_diff.dart'; |
23 | 22 |
24 // TODO(rnystrom): Use "package:" URL (#4968). | 23 // TODO(rnystrom): Use "package:" URL (#4968). |
25 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; | 24 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; |
26 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; | 25 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; |
27 import '../../sdk/lib/_internal/compiler/implementation/filenames.dart'; | 26 import '../../sdk/lib/_internal/compiler/implementation/filenames.dart'; |
28 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; | 27 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; |
29 import '../../sdk/lib/_internal/libraries.dart'; | 28 import '../../sdk/lib/_internal/libraries.dart'; |
30 import 'package:pathos/path.dart' as pathos; | 29 import 'package:pathos/path.dart' as pathos; |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 /** Converts a local path string to a `file:` [Uri]. */ | 484 /** Converts a local path string to a `file:` [Uri]. */ |
486 Uri _pathToFileUri(String path) { | 485 Uri _pathToFileUri(String path) { |
487 path = pathos.absolute(path); | 486 path = pathos.absolute(path); |
488 if (Platform.operatingSystem != 'windows') { | 487 if (Platform.operatingSystem != 'windows') { |
489 return Uri.parse('file://$path'); | 488 return Uri.parse('file://$path'); |
490 } else { | 489 } else { |
491 return Uri.parse('file:///${path.replaceAll("\\", "/")}'); | 490 return Uri.parse('file:///${path.replaceAll("\\", "/")}'); |
492 } | 491 } |
493 } | 492 } |
494 | 493 |
OLD | NEW |