| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 options; | 5 library options; |
| 6 | 6 |
| 7 import 'package:args/args.dart'; | 7 import 'package:args/args.dart'; |
| 8 | 8 |
| 9 class CompilerOptions { | 9 class CompilerOptions { |
| 10 /** Report warnings as errors. */ | 10 /** Report warnings as errors. */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 * but disabled for deployment. | 43 * but disabled for deployment. |
| 44 */ | 44 */ |
| 45 final bool rewriteUrls; | 45 final bool rewriteUrls; |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Whether to print error messages using the json format understood by the | 48 * Whether to print error messages using the json format understood by the |
| 49 * Dart editor. | 49 * Dart editor. |
| 50 */ | 50 */ |
| 51 final bool jsonFormat; | 51 final bool jsonFormat; |
| 52 | 52 |
| 53 // TODO(terry): Make polyfill the default maybe add --no_css_polyfill. */ | |
| 54 /** Emulate scoped styles using a CSS polyfill. */ | 53 /** Emulate scoped styles using a CSS polyfill. */ |
| 55 final bool processCss; | 54 final bool processCss; |
| 56 | 55 |
| 57 /** Emit debugging information for CSS processing. */ | 56 /** Emit debugging information for CSS processing. */ |
| 58 final bool debugCss; | 57 final bool debugCss; |
| 59 | 58 |
| 60 // We could make this faster, if it ever matters. | 59 // We could make this faster, if it ever matters. |
| 61 factory CompilerOptions() => parse(['']); | 60 factory CompilerOptions() => parse(['']); |
| 62 | 61 |
| 63 CompilerOptions.fromArgs(ArgResults args) | 62 CompilerOptions.fromArgs(ArgResults args) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 showUsage(parser); | 128 showUsage(parser); |
| 130 return null; | 129 return null; |
| 131 } | 130 } |
| 132 } | 131 } |
| 133 | 132 |
| 134 static showUsage(parser) { | 133 static showUsage(parser) { |
| 135 print('Usage: dwc [options...] input.html'); | 134 print('Usage: dwc [options...] input.html'); |
| 136 print(parser.getUsage()); | 135 print(parser.getUsage()); |
| 137 } | 136 } |
| 138 } | 137 } |
| OLD | NEW |