| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Set of flags and options passed to the compiler | 5 /// Set of flags and options passed to the compiler |
| 6 library dev_compiler.src.options; | 6 library dev_compiler.src.options; |
| 7 | 7 |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:args/args.dart'; | 10 import 'package:args/args.dart'; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 defaultsTo: '8080') | 311 defaultsTo: '8080') |
| 312 ..addFlag('closure', | 312 ..addFlag('closure', |
| 313 help: 'Emit Closure Compiler-friendly code (experimental)', | 313 help: 'Emit Closure Compiler-friendly code (experimental)', |
| 314 defaultsTo: _CLOSURE_DEFAULT) | 314 defaultsTo: _CLOSURE_DEFAULT) |
| 315 ..addFlag('force-compile', | 315 ..addFlag('force-compile', |
| 316 abbr: 'f', help: 'Compile code with static errors', defaultsTo: false) | 316 abbr: 'f', help: 'Compile code with static errors', defaultsTo: false) |
| 317 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to warning)') | 317 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to warning)') |
| 318 ..addFlag('dump-info', | 318 ..addFlag('dump-info', |
| 319 abbr: 'i', help: 'Dump summary information', defaultsTo: null) | 319 abbr: 'i', help: 'Dump summary information', defaultsTo: null) |
| 320 ..addFlag('html-report', | 320 ..addFlag('html-report', |
| 321 help: 'Output compilation results to html', defaultsTo: null) | 321 help: 'Output compilation results to html', defaultsTo: false) |
| 322 ..addOption('v8-binary', | 322 ..addOption('v8-binary', |
| 323 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)', | 323 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)', |
| 324 defaultsTo: 'iojs') | 324 defaultsTo: 'iojs') |
| 325 ..addOption('dump-info-file', | 325 ..addOption('dump-info-file', |
| 326 help: 'Dump info json file (requires dump-info)', defaultsTo: null); | 326 help: 'Dump info json file (requires dump-info)', defaultsTo: null); |
| 327 | 327 |
| 328 // TODO: Switch over to the `pub_cache` package (or the Resource API)? | 328 // TODO: Switch over to the `pub_cache` package (or the Resource API)? |
| 329 | 329 |
| 330 /// Tries to find the `lib/runtime/` directory of the dev_compiler package. This | 330 /// Tries to find the `lib/runtime/` directory of the dev_compiler package. This |
| 331 /// works when running devc from it's sources or from a snapshot that is | 331 /// works when running devc from it's sources or from a snapshot that is |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // The pub-cache directory is two levels up, but we verify that the layout | 374 // The pub-cache directory is two levels up, but we verify that the layout |
| 375 // looks correct. | 375 // looks correct. |
| 376 if (path.basename(dir) != 'dev_compiler') return null; | 376 if (path.basename(dir) != 'dev_compiler') return null; |
| 377 dir = path.dirname(dir); | 377 dir = path.dirname(dir); |
| 378 if (path.basename(dir) != 'global_packages') return null; | 378 if (path.basename(dir) != 'global_packages') return null; |
| 379 dir = path.dirname(dir); | 379 dir = path.dirname(dir); |
| 380 return path.join(dir, cacheDir, 'lib', 'runtime'); | 380 return path.join(dir, cacheDir, 'lib', 'runtime'); |
| 381 } | 381 } |
| 382 return null; | 382 return null; |
| 383 } | 383 } |
| OLD | NEW |