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

Side by Side Diff: bin/devrun.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 | « bin/devc.dart ('k') | lib/src/compiler.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 io.js with dev_compiler's generated code. 6 /// Runs io.js with dev_compiler's generated code.
7 library dev_compiler.bin.devrun; 7 library dev_compiler.bin.devrun;
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 21 matching lines...) Expand all
32 CompilerOptions options = validateOptions(args, forceOutDir: true); 32 CompilerOptions options = validateOptions(args, forceOutDir: true);
33 if (options == null || options.help) { 33 if (options == null || options.help) {
34 _showUsageAndExit(); 34 _showUsageAndExit();
35 } 35 }
36 if (options.inputs.length != 1) { 36 if (options.inputs.length != 1) {
37 stderr.writeln("Please only specify one input to run"); 37 stderr.writeln("Please only specify one input to run");
38 _showUsageAndExit(); 38 _showUsageAndExit();
39 } 39 }
40 var runner = new V8Runner(options); 40 var runner = new V8Runner(options);
41 41
42 if (!await compile(options)) exit(1); 42 if (!compile(options)) exit(1);
43 43
44 var files = await listOutputFiles(options); 44 var files = await listOutputFiles(options);
45 var startStatement = 'dart_library.start("${getMainModuleName(options)}");'; 45 var startStatement = 'dart_library.start("${getMainModuleName(options)}");';
46 46
47 // TODO(ochafik): Only generate the html when some flag is set. 47 // TODO(ochafik): Only generate the html when some flag is set.
48 await _writeHtmlRunner(options, files, startStatement); 48 await _writeHtmlRunner(options, files, startStatement);
49 49
50 // Give our soul (and streams) away to iojs. 50 // Give our soul (and streams) away to iojs.
51 Process process = await runner.start(files, startStatement); 51 Process process = await runner.start(files, startStatement);
52 stdin.pipe(process.stdin); 52 stdin.pipe(process.stdin);
(...skipping 17 matching lines...) Expand all
70 '''); 70 ''');
71 71
72 stderr.writeln( 72 stderr.writeln(
73 'Wrote $htmlOutput. It can be opened in Chrome Dev with the following flag s:\n' 73 'Wrote $htmlOutput. It can be opened in Chrome Dev with the following flag s:\n'
74 '--js-flags="--harmony-arrow-functions ' 74 '--js-flags="--harmony-arrow-functions '
75 '--harmony-classes ' 75 '--harmony-classes '
76 '--harmony-computed-property-names ' 76 '--harmony-computed-property-names '
77 '--harmony-spreadcalls"' 77 '--harmony-spreadcalls"'
78 '\n'); 78 '\n');
79 } 79 }
OLDNEW
« no previous file with comments | « bin/devc.dart ('k') | lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698