Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: utils/apidoc/apidoc.dart

Issue 13990004: Revert "Attempt to re-commit Dartdoc exports." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/dartdoc/test/utils_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc.dart
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index b7783b46dd7abaddcde35037908da050111e4031..a4fbe43c5b1433316b74d7b5b176b410ed0d72aa 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -17,7 +17,6 @@ library apidoc;
import 'dart:async';
import 'dart:io';
import 'dart:json' as json;
-import 'dart:uri';
import 'html_diff.dart';
@@ -26,7 +25,6 @@ import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart';
import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
import '../../sdk/lib/_internal/libraries.dart';
-import 'package:pathos/path.dart' as pathos;
HtmlDiff _diff;
@@ -39,7 +37,7 @@ void main() {
List<String> excludedLibraries = <String>[];
List<String> includedLibraries = <String>[];
- String packageRoot;
+ Path packageRoot;
String version;
// Parse the command-line arguments.
@@ -67,7 +65,7 @@ void main() {
} else if (arg.startsWith('--out=')) {
outputDir = new Path(arg.substring('--out='.length));
} else if (arg.startsWith('--package-root=')) {
- packageRoot = arg.substring('--package-root='.length);
+ packageRoot = new Path(arg.substring('--package-root='.length));
} else if (arg.startsWith('--version=')) {
version = arg.substring('--version='.length);
} else {
@@ -106,10 +104,10 @@ void main() {
// TODO(johnniwinther): Libraries for the compilation seem to be more like
// URIs. Perhaps Path should have a toURI() method.
// Add all of the core libraries.
- final apidocLibraries = <Uri>[];
+ final apidocLibraries = <Path>[];
LIBRARIES.forEach((String name, LibraryInfo info) {
if (info.documented) {
- apidocLibraries.add(Uri.parse('dart:$name'));
+ apidocLibraries.add(new Path('dart:$name'));
}
});
@@ -132,7 +130,7 @@ void main() {
}
if (new File.fromPath(libPath).existsSync()) {
- apidocLibraries.add(_pathToFileUri(libPath.toNativePath()));
+ apidocLibraries.add(libPath);
includedLibraries.add(libName);
} else {
print('Warning: could not find package at $path');
@@ -149,7 +147,7 @@ void main() {
// TODO(amouravski): make apidoc use roughly the same flow as bin/dartdoc.
Future.wait([copiedStatic, copiedApiDocStatic, htmlDiff])
- .then((_) => apidoc.documentLibraries(apidocLibraries, libPath,
+ .then((_) => apidoc.documentLibraries( apidocLibraries, libPath,
packageRoot))
.then((_) => compileScript(mode, outputDir, libPath))
.then((_) => print(apidoc.status))
@@ -449,14 +447,3 @@ class Apidoc extends Dartdoc {
return a(memberUrl(member), memberName);
}
}
-
-/** Converts a local path string to a `file:` [Uri]. */
-Uri _pathToFileUri(String path) {
- path = pathos.absolute(path);
- if (Platform.operatingSystem != 'windows') {
- return Uri.parse('file://$path');
- } else {
- return Uri.parse('file:///${path.replaceAll("\\", "/")}');
- }
-}
-
« no previous file with comments | « sdk/lib/_internal/dartdoc/test/utils_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698