OLD | NEW |
(Empty) | |
| 1 library angular.tools.transformer.options; |
| 2 |
| 3 import 'dart:async'; |
| 4 |
| 5 import 'package:barback/barback.dart'; |
| 6 import 'package:code_transformers/resolver.dart'; |
| 7 import 'package:di/transformer/options.dart' as di; |
| 8 |
| 9 /** Options used by Angular transformers */ |
| 10 class TransformOptions { |
| 11 |
| 12 /** |
| 13 * List of html file paths which may contain Angular expressions. |
| 14 * The paths are relative to the package home and are represented using posix |
| 15 * style, which matches the representation used in asset ids in barback. |
| 16 */ |
| 17 final List<String> htmlFiles; |
| 18 |
| 19 /** |
| 20 * Path to the Dart SDK directory, for resolving Dart libraries. |
| 21 */ |
| 22 final String sdkDirectory; |
| 23 |
| 24 /** |
| 25 * Template cache path modifiers |
| 26 */ |
| 27 final Map<String, String> templateUriRewrites; |
| 28 |
| 29 /** |
| 30 * Dependency injection options. |
| 31 */ |
| 32 final di.TransformOptions diOptions; |
| 33 |
| 34 TransformOptions({String sdkDirectory, List<String> htmlFiles, |
| 35 Map<String, String> templateUriRewrites, |
| 36 di.TransformOptions diOptions}) : |
| 37 sdkDirectory = sdkDirectory, |
| 38 htmlFiles = htmlFiles != null ? htmlFiles : [], |
| 39 templateUriRewrites = templateUriRewrites != null ? |
| 40 templateUriRewrites : {}, |
| 41 diOptions = diOptions { |
| 42 if (sdkDirectory == null) |
| 43 throw new ArgumentError('sdkDirectory must be provided.'); |
| 44 } |
| 45 } |
OLD | NEW |