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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 final List<String> nonnullableTypes; | 189 final List<String> nonnullableTypes; |
190 | 190 |
191 /// Whether to use static types for code generation. | 191 /// Whether to use static types for code generation. |
192 @override | 192 @override |
193 final bool ignoreTypes; | 193 final bool ignoreTypes; |
194 | 194 |
195 /// Whether to emit the source map files. | 195 /// Whether to emit the source map files. |
196 @override | 196 @override |
197 final bool emitSourceMaps; | 197 final bool emitSourceMaps; |
198 | 198 |
199 /// Location for runtime files, such as `dart_core.js`. By default this is | 199 /// Location for runtime files, such as `dart_runtime.js`. By default this is |
200 /// inferred to be under `lib/runtime/` in the location of the `dev_compiler` | 200 /// inferred to be under `lib/runtime/` in the location of the `dev_compiler` |
201 /// package (if we can infer where that is located). | 201 /// package (if we can infer where that is located). |
202 final String runtimeDir; | 202 final String runtimeDir; |
203 | 203 |
204 CompilerOptions({this.allowConstCasts: true, this.checkSdk: false, | 204 CompilerOptions({this.allowConstCasts: true, this.checkSdk: false, |
205 this.dumpInfo: false, this.dumpInfoFile, this.dumpSrcDir, | 205 this.dumpInfo: false, this.dumpInfoFile, this.dumpSrcDir, |
206 this.forceCompile: false, this.formatOutput: false, | 206 this.forceCompile: false, this.formatOutput: false, |
207 this.cheapTestFormat: false, this.ignoreTypes: false, this.outputDir, | 207 this.cheapTestFormat: false, this.ignoreTypes: false, this.outputDir, |
208 this.outputDart: false, this.useColors: true, | 208 this.outputDart: false, this.useColors: true, |
209 this.covariantGenerics: true, this.relaxedCasts: true, | 209 this.covariantGenerics: true, this.relaxedCasts: true, |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // The pub-cache directory is two levels up, but we verify that the layout | 395 // The pub-cache directory is two levels up, but we verify that the layout |
396 // looks correct. | 396 // looks correct. |
397 if (path.basename(dir) != 'dev_compiler') return null; | 397 if (path.basename(dir) != 'dev_compiler') return null; |
398 dir = path.dirname(dir); | 398 dir = path.dirname(dir); |
399 if (path.basename(dir) != 'global_packages') return null; | 399 if (path.basename(dir) != 'global_packages') return null; |
400 dir = path.dirname(dir); | 400 dir = path.dirname(dir); |
401 return path.join(dir, cacheDir, 'lib', 'runtime'); | 401 return path.join(dir, cacheDir, 'lib', 'runtime'); |
402 } | 402 } |
403 return null; | 403 return null; |
404 } | 404 } |
OLD | NEW |