Index: web/main.dart |
diff --git a/web/main.dart b/web/main.dart |
index 32d1ba6583c4c9e5dce187a7361eed8a85f0a4cd..dc58a96a9201943ce9db8c3ae5ed3400b55027e8 100755 |
--- a/web/main.dart |
+++ b/web/main.dart |
@@ -46,26 +46,20 @@ import 'package:js/js.dart'; |
import 'web_command.dart'; |
@JS() |
-external set compileDartExpression(Function function); |
- |
-typedef String CompileFn(String dart); |
-typedef void OnLoadFn(CompileFn compile); |
+external set setUp(Function function); |
Future main() async { |
var args = ['compile']; |
Jacob
2016/08/03 23:58:31
passing args and using command runner doesn't seem
priscillalee
2016/08/04 16:01:56
I looked into this myself earlier because I was wo
Jacob
2016/08/04 16:27:48
Just add a TODO indicating just that so the next p
priscillalee
2016/08/04 17:56:33
Done.
|
- _runCommand((result) { |
- compileDartExpression = allowInterop(result); |
- }, args); |
+ _runCommand(args); |
} |
/// Runs a single compile command, and returns an exit code. |
-Future<int> _runCommand(OnLoadFn onload, List<String> args, |
+Future<int> _runCommand(List<String> args, |
{MessageHandler messageHandler}) async { |
try { |
var runner = new CommandRunner('dartdevc', 'Dart Development Compiler'); |
- runner |
- .addCommand(new WebCompileCommand(onload, messageHandler: messageHandler)); |
- await runner.run(args); |
+ runner.addCommand(new WebCompileCommand(messageHandler: messageHandler)); |
+ setUp = allowInterop(await runner.run(args)); |
} catch (e, s) { |
return _handleError(e, s, args, messageHandler: messageHandler); |
} |