| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|