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

Unified Diff: bin/devc.dart

Issue 1270993002: fixes #276, path manipulation issues on windows. Also fixes server mode (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix comment Created 5 years, 4 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 | « no previous file | bin/devrun.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/devc.dart
diff --git a/bin/devc.dart b/bin/devc.dart
index 204824577275bc59d9cb03a18070aefd27ad07c5..df0f3183168200cb990659259310e7cc7d3472cd 100755
--- a/bin/devc.dart
+++ b/bin/devc.dart
@@ -9,8 +9,10 @@ library dev_compiler.bin.devc;
import 'dart:io';
-import 'package:dev_compiler/src/compiler.dart' show validateOptions, compile;
+import 'package:dev_compiler/src/compiler.dart'
+ show validateOptions, compile, setupLogger;
import 'package:dev_compiler/src/options.dart';
+import 'package:dev_compiler/src/server/server.dart' show DevServer;
void _showUsageAndExit() {
print('usage: dartdevc [<options>] <file.dart>...\n');
@@ -24,6 +26,12 @@ main(List<String> args) async {
var options = validateOptions(args);
if (options == null || options.help) _showUsageAndExit();
- bool success = await compile(options);
- exit(success ? 0 : 1);
+ setupLogger(options.logLevel, print);
+
+ if (options.serverMode) {
+ new DevServer(options).start();
+ } else {
+ var success = compile(options);
+ exit(success ? 0 : 1);
+ }
}
« no previous file with comments | « no previous file | bin/devrun.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698