| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 help: 'Serve embedded widget with static errors and warnings.', | 295 help: 'Serve embedded widget with static errors and warnings.', |
| 296 defaultsTo: true) | 296 defaultsTo: true) |
| 297 ..addOption('host', | 297 ..addOption('host', |
| 298 help: 'Host name or address to serve files from, e.g. --host=0.0.0.0\n' | 298 help: 'Host name or address to serve files from, e.g. --host=0.0.0.0\n' |
| 299 'to listen on all interfaces (used only when --serve is on)', | 299 'to listen on all interfaces (used only when --serve is on)', |
| 300 defaultsTo: 'localhost') | 300 defaultsTo: 'localhost') |
| 301 ..addOption('port', | 301 ..addOption('port', |
| 302 help: 'Port to serve files from (used only when --serve is on)', | 302 help: 'Port to serve files from (used only when --serve is on)', |
| 303 defaultsTo: '8080') | 303 defaultsTo: '8080') |
| 304 ..addFlag('closure', | 304 ..addFlag('closure', |
| 305 help: 'Emit Closure Compiler-friendly code (experimental)', defaultsTo: _C
LOSURE_DEFAULT) | 305 help: 'Emit Closure Compiler-friendly code (experimental)', |
| 306 defaultsTo: _CLOSURE_DEFAULT) |
| 306 ..addFlag('force-compile', | 307 ..addFlag('force-compile', |
| 307 help: 'Compile code with static errors', defaultsTo: false) | 308 help: 'Compile code with static errors', defaultsTo: false) |
| 308 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to severe)') | 309 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to severe)') |
| 309 ..addFlag('dump-info', | 310 ..addFlag('dump-info', |
| 310 abbr: 'i', help: 'Dump summary information', defaultsTo: null) | 311 abbr: 'i', help: 'Dump summary information', defaultsTo: null) |
| 311 ..addOption('v8-binary', | 312 ..addOption('v8-binary', |
| 312 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)', | 313 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)', |
| 313 defaultsTo: 'iojs') | 314 defaultsTo: 'iojs') |
| 314 ..addOption('dump-info-file', | 315 ..addOption('dump-info-file', |
| 315 abbr: 'f', | 316 abbr: 'f', |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // The pub-cache directory is two levels up, but we verify that the layout | 361 // The pub-cache directory is two levels up, but we verify that the layout |
| 361 // looks correct. | 362 // looks correct. |
| 362 if (path.basename(dir) != 'dev_compiler') return null; | 363 if (path.basename(dir) != 'dev_compiler') return null; |
| 363 dir = path.dirname(dir); | 364 dir = path.dirname(dir); |
| 364 if (path.basename(dir) != 'global_packages') return null; | 365 if (path.basename(dir) != 'global_packages') return null; |
| 365 dir = path.dirname(dir); | 366 dir = path.dirname(dir); |
| 366 return path.join(dir, cacheDir, 'lib', 'runtime'); | 367 return path.join(dir, cacheDir, 'lib', 'runtime'); |
| 367 } | 368 } |
| 368 return null; | 369 return null; |
| 369 } | 370 } |
| OLD | NEW |