| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dart2js.cmdline; | 5 library dart2js.cmdline; |
| 6 | 6 |
| 7 import 'dart:async' | 7 import 'dart:async' |
| 8 show Future, EventSink; | 8 show Future, EventSink; |
| 9 import 'dart:io' | 9 import 'dart:io' |
| 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException, | 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 (_) => diagnosticHandler.showHints = false), | 281 (_) => diagnosticHandler.showHints = false), |
| 282 new OptionHandler( | 282 new OptionHandler( |
| 283 '--output-type=dart|--output-type=dart-multi|--output-type=js', | 283 '--output-type=dart|--output-type=dart-multi|--output-type=js', |
| 284 setOutputType), | 284 setOutputType), |
| 285 new OptionHandler('--verbose', setVerbose), | 285 new OptionHandler('--verbose', setVerbose), |
| 286 new OptionHandler('--version', (_) => wantVersion = true), | 286 new OptionHandler('--version', (_) => wantVersion = true), |
| 287 new OptionHandler('--library-root=.+', setLibraryRoot), | 287 new OptionHandler('--library-root=.+', setLibraryRoot), |
| 288 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), | 288 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), |
| 289 new OptionHandler('--allow-mock-compilation', passThrough), | 289 new OptionHandler('--allow-mock-compilation', passThrough), |
| 290 new OptionHandler('--minify|-m', implyCompilation), | 290 new OptionHandler('--minify|-m', implyCompilation), |
| 291 new OptionHandler('--preserve-uris', passThrough), | |
| 292 new OptionHandler('--force-strip=.*', setStrip), | 291 new OptionHandler('--force-strip=.*', setStrip), |
| 293 new OptionHandler('--disable-diagnostic-colors', | 292 new OptionHandler('--disable-diagnostic-colors', |
| 294 (_) => diagnosticHandler.enableColors = false), | 293 (_) => diagnosticHandler.enableColors = false), |
| 295 new OptionHandler('--enable-diagnostic-colors', | 294 new OptionHandler('--enable-diagnostic-colors', |
| 296 (_) => diagnosticHandler.enableColors = true), | 295 (_) => diagnosticHandler.enableColors = true), |
| 297 new OptionHandler('--enable[_-]checked[_-]mode|--checked', | 296 new OptionHandler('--enable[_-]checked[_-]mode|--checked', |
| 298 (_) => setCheckedMode('--enable-checked-mode')), | 297 (_) => setCheckedMode('--enable-checked-mode')), |
| 299 new OptionHandler('--enable-concrete-type-inference', | 298 new OptionHandler('--enable-concrete-type-inference', |
| 300 (_) => implyCompilation( | 299 (_) => implyCompilation( |
| 301 '--enable-concrete-type-inference')), | 300 '--enable-concrete-type-inference')), |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 --enable-diagnostic-colors | 517 --enable-diagnostic-colors |
| 519 Add colors to diagnostic messages. | 518 Add colors to diagnostic messages. |
| 520 | 519 |
| 521 --terse | 520 --terse |
| 522 Emit diagnostics without suggestions for how to get rid of the diagnosed | 521 Emit diagnostics without suggestions for how to get rid of the diagnosed |
| 523 problems. | 522 problems. |
| 524 | 523 |
| 525 --show-package-warnings | 524 --show-package-warnings |
| 526 Show warnings and hints generated from packages. | 525 Show warnings and hints generated from packages. |
| 527 | 526 |
| 528 --preserve-uris | |
| 529 Preserve the source URIs in the reflection data. Without this flag the | |
| 530 `uri` getter for `LibraryMirror`s is mangled in minified mode. | |
| 531 | |
| 532 --csp | 527 --csp |
| 533 Disables dynamic generation of code in the generated output. This is | 528 Disables dynamic generation of code in the generated output. This is |
| 534 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). | 529 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). |
| 535 | 530 |
| 536 The following options are only used for compiler development and may | 531 The following options are only used for compiler development and may |
| 537 be removed in a future version: | 532 be removed in a future version: |
| 538 | 533 |
| 539 --output-type=dart | 534 --output-type=dart |
| 540 Output Dart code instead of JavaScript. | 535 Output Dart code instead of JavaScript. |
| 541 | 536 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 } else { | 665 } else { |
| 671 print(">>> TEST FAIL"); | 666 print(">>> TEST FAIL"); |
| 672 } | 667 } |
| 673 stderr.writeln(">>> EOF STDERR"); | 668 stderr.writeln(">>> EOF STDERR"); |
| 674 runJob(); | 669 runJob(); |
| 675 }); | 670 }); |
| 676 } | 671 } |
| 677 | 672 |
| 678 runJob(); | 673 runJob(); |
| 679 } | 674 } |
| OLD | NEW |