Index: tools/dom/docs/bin/docs.dart |
diff --git a/tools/dom/docs/bin/docs.dart b/tools/dom/docs/bin/docs.dart |
index cdc7974f0d3d56b40b77d49bba544c7716abd239..04f888436b441b20208e43be99fc7459ecc89e18 100644 |
--- a/tools/dom/docs/bin/docs.dart |
+++ b/tools/dom/docs/bin/docs.dart |
@@ -14,24 +14,15 @@ import 'package:path/path.dart' as path; |
import '../lib/docs.dart'; |
-final String json_path = |
- path.normalize(path.join(scriptDir, '..', 'docs.json')); |
-final String lib_path = |
- path.toUri(path.normalize( |
- path.join(scriptDir, '..', '..', '..', '..', 'sdk'))).toString(); |
+final String json_path = Platform.script.resolve('../docs.json').toFilePath(); |
+final String lib_uri = Platform.script.resolve('../../../../sdk').toString(); |
main() { |
print('Converting HTML docs from $lib_path to $json_path.'); |
- convert(lib_path, json_path) |
+ convert(lib_uri, 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); |