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

Unified Diff: pkg/front_end/tool/vm/reload.dart

Issue 2928483005: Add an incremental reloader example and a utility tool to trigger a reload by (Closed)
Patch Set: CL comments Created 3 years, 6 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
Index: pkg/front_end/tool/vm/reload.dart
diff --git a/pkg/front_end/tool/vm/reload.dart b/pkg/front_end/tool/vm/reload.dart
new file mode 100644
index 0000000000000000000000000000000000000000..95fc78457596a09cdf74dfe4848b87c85b21ae7a
--- /dev/null
+++ b/pkg/front_end/tool/vm/reload.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:front_end/src/vm/reload.dart';
+
+/// Connects to an existing VM's service protocol and issues a hot-reload
+/// request. The VM must have been launched with `--observe` to enable the
+/// service protocol.
+///
+// TODO(sigmund): provide flags to configure the vm-service port.
+main(List<String> args) async {
+ if (args.length == 0) {
+ print('usage: reload <entry-uri>');
+ return;
+ }
+
+ var reloader = new VmReloader();
+ await reloader.reload(Uri.base.resolve(args.first));
+ await reloader.disconnect();
+}

Powered by Google App Engine
This is Rietveld 408576698