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

Unified Diff: runtime/bin/vmservice/client/build.dart

Issue 105953008: Observatory frontend changes for Dartium DevTools. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « no previous file | runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/client/build.dart
diff --git a/runtime/bin/vmservice/client/build.dart b/runtime/bin/vmservice/client/build.dart
index 627da4e2868ea8fde873ff9d8d18e2ed280dc784..6b7d11f08ae8877698ec1ef17793cb05345f82bd 100644
--- a/runtime/bin/vmservice/client/build.dart
+++ b/runtime/bin/vmservice/client/build.dart
@@ -11,23 +11,34 @@ main() {
.then((_) => deploy()).then(compileToJs);
}
-compileToJs(_) {
- print("Running dart2js");
- var dart_path = Platform.executable;
- var dart2js_path = 'dart2js';
- if (dart_path.lastIndexOf(Platform.pathSeparator) != -1) {
- var bin_path = dart_path.substring(0, dart_path.lastIndexOf(Platform.pathSeparator));
- dart2js_path = "$bin_path${Platform.pathSeparator}dart2js";
+String findDart2JS() {
+ var dartPath = Platform.executable;
+ var lastIndex = dartPath.lastIndexOf(Platform.pathSeparator);
+ if (lastIndex != -1) {
+ var binPath = dartPath.substring(0, lastIndex);
+ return '$binPath${Platform.pathSeparator}dart2js';
}
+ return 'dart2js';
+}
+
+void runDart2JS(String input, String output) {
+ var dart2js_path = findDart2JS();
var result =
Process.runSync(dart2js_path,
- [ '--minify', '-o', 'out/web/index.html_bootstrap.dart.js',
- 'out/web/index.html_bootstrap.dart'], runInShell: true);
+ [ '--minify', '-o', output, input], runInShell: true);
print(result.stdout);
print(result.stderr);
if (result.exitCode != 0) {
print("Running dart2js failed.");
exit(result.exitCode);
}
+}
+
+compileToJs(_) {
+ print("Running dart2js");
+ runDart2JS('out/web/index.html_bootstrap.dart',
+ 'out/web/index.html_bootstrap.dart.js');
+ runDart2JS('out/web/index_devtools.html_bootstrap.dart',
+ 'out/web/index_devtools.html_bootstrap.dart.js');
print("Done");
}
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/deployed/web/index.html_bootstrap.dart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698