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

Unified Diff: tools/dom/docs/bin/docs.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « tests/standalone/vmservice/test_helper.dart ('k') | tools/dom/docs/test/docs_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/docs/bin/docs.dart
diff --git a/tools/dom/docs/bin/docs.dart b/tools/dom/docs/bin/docs.dart
index 7307ab1045a31d8e7fc5979a5adae53745af4bb1..cdc7974f0d3d56b40b77d49bba544c7716abd239 100644
--- a/tools/dom/docs/bin/docs.dart
+++ b/tools/dom/docs/bin/docs.dart
@@ -14,15 +14,24 @@ import 'package:path/path.dart' as path;
import '../lib/docs.dart';
-final String json_path = Platform.script.resolve('../docs.json').toFilePath();
-final String lib_uri = Platform.script.resolve('../../../../sdk').toString();
+final String json_path =
+ path.normalize(path.join(scriptDir, '..', 'docs.json'));
+final String lib_path =
+ path.toUri(path.normalize(
+ path.join(scriptDir, '..', '..', '..', '..', 'sdk'))).toString();
main() {
- print('Converting HTML docs from $lib_uri to $json_path.');
+ print('Converting HTML docs from $lib_path to $json_path.');
- convert(lib_uri, json_path)
+ convert(lib_path, json_path)
.then((bool anyErrors) {
print('Converted HTML docs ${anyErrors ? "with": "without"}'
' errors.');
});
}
+
+/**
+ * Gets the full path to the directory containing the entrypoint of the current
+ * script.
+ */
+String get scriptDir => path.dirname(Platform.script);
« no previous file with comments | « tests/standalone/vmservice/test_helper.dart ('k') | tools/dom/docs/test/docs_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698