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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | bin/devrun.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 /// Runs dev_compiler's checker, and optionally the code generator. 6 /// Runs dev_compiler's checker, and optionally the code generator.
7 /// Also can run a server for local development. 7 /// Also can run a server for local development.
8 library dev_compiler.bin.devc; 8 library dev_compiler.bin.devc;
9 9
10 import 'dart:io'; 10 import 'dart:io';
11 11
12 import 'package:dev_compiler/src/compiler.dart' show validateOptions, compile; 12 import 'package:dev_compiler/src/compiler.dart'
13 show validateOptions, compile, setupLogger;
13 import 'package:dev_compiler/src/options.dart'; 14 import 'package:dev_compiler/src/options.dart';
15 import 'package:dev_compiler/src/server/server.dart' show DevServer;
14 16
15 void _showUsageAndExit() { 17 void _showUsageAndExit() {
16 print('usage: dartdevc [<options>] <file.dart>...\n'); 18 print('usage: dartdevc [<options>] <file.dart>...\n');
17 print('<file.dart> is one or more Dart files to process.\n'); 19 print('<file.dart> is one or more Dart files to process.\n');
18 print('<options> include:\n'); 20 print('<options> include:\n');
19 print(argParser.usage); 21 print(argParser.usage);
20 exit(1); 22 exit(1);
21 } 23 }
22 24
23 main(List<String> args) async { 25 main(List<String> args) async {
24 var options = validateOptions(args); 26 var options = validateOptions(args);
25 if (options == null || options.help) _showUsageAndExit(); 27 if (options == null || options.help) _showUsageAndExit();
26 28
27 bool success = await compile(options); 29 setupLogger(options.logLevel, print);
28 exit(success ? 0 : 1); 30
31 if (options.serverMode) {
32 new DevServer(options).start();
33 } else {
34 var success = compile(options);
35 exit(success ? 0 : 1);
36 }
29 } 37 }
OLDNEW
« 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