Chromium Code Reviews| 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 polymer.src.compiler_options; | 5 library polymer.src.compiler_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 */ | 50 */ |
| 51 final bool jsonFormat; | 51 final bool jsonFormat; |
| 52 | 52 |
| 53 /** Emulate scoped styles using a CSS polyfill. */ | 53 /** Emulate scoped styles using a CSS polyfill. */ |
| 54 final bool emulateScopedCss; | 54 final bool emulateScopedCss; |
| 55 | 55 |
| 56 /** Use CSS file for CSS Reset. */ | 56 /** Use CSS file for CSS Reset. */ |
| 57 final String resetCssFile; | 57 final String resetCssFile; |
| 58 | 58 |
| 59 /** Whether to analyze the input for warnings without generating any code. */ | 59 /** Whether to analyze the input for warnings without generating any code. */ |
| 60 // TODO(sigmund): remove/deprecate this flag | |
|
Jennifer Messerly
2013/08/28 22:25:45
you could remove the boolean now right? but contin
Siggi Cherem (dart-lang)
2013/08/28 23:17:06
Done.
| |
| 60 final bool analysisOnly; | 61 final bool analysisOnly; |
| 61 | 62 |
| 62 // We could make this faster, if it ever matters. | 63 // We could make this faster, if it ever matters. |
| 63 factory CompilerOptions() => parse(['']); | 64 factory CompilerOptions() => parse(['']); |
| 64 | 65 |
| 65 CompilerOptions.fromArgs(ArgResults args) | 66 CompilerOptions.fromArgs(ArgResults args) |
| 66 : warningsAsErrors = args['warnings_as_errors'], | 67 : warningsAsErrors = args['warnings_as_errors'], |
| 67 verbose = args['verbose'], | 68 verbose = args['verbose'], |
| 68 clean = args['clean'], | 69 clean = args['clean'], |
| 69 useColors = args['colors'], | 70 useColors = args['colors'], |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 showUsage(parser); | 140 showUsage(parser); |
| 140 return null; | 141 return null; |
| 141 } | 142 } |
| 142 } | 143 } |
| 143 | 144 |
| 144 static showUsage(parser) { | 145 static showUsage(parser) { |
| 145 print('Usage: dwc [options...] input.html'); | 146 print('Usage: dwc [options...] input.html'); |
| 146 print(parser.getUsage()); | 147 print(parser.getUsage()); |
| 147 } | 148 } |
| 148 } | 149 } |
| OLD | NEW |