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 /// Transformer that replaces the default mirror-based implementation of smoke, | 5 /// Transformer that replaces the default mirror-based implementation of smoke, |
6 /// so that during deploy smoke doesn't include any dependency on dart:mirrors. | 6 /// so that during deploy smoke doesn't include any dependency on dart:mirrors. |
7 library smoke.src.default_transformer; | 7 library smoke.src.default_transformer; |
8 | 8 |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 import 'package:barback/barback.dart'; | 10 import 'package:barback/barback.dart'; |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Note: this rewrite is highly-coupled with how implementation.dart is | 27 // Note: this rewrite is highly-coupled with how implementation.dart is |
28 // written. Make sure both are updated in sync. | 28 // written. Make sure both are updated in sync. |
29 transform.addOutput(new Asset.fromString(id, code | 29 transform.addOutput(new Asset.fromString(id, code |
30 .replaceAll(new RegExp('new Reflective[^;]*;'), | 30 .replaceAll(new RegExp('new Reflective[^;]*;'), |
31 'throwNotConfiguredError();') | 31 'throwNotConfiguredError();') |
32 .replaceAll("import 'package:smoke/mirrors.dart';", ''))); | 32 .replaceAll("import 'package:smoke/mirrors.dart';", ''))); |
33 }); | 33 }); |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
| 37 /** Transformer phases which should be applied to the smoke package. */ |
| 38 List<List<Transformer>> get phasesForSmoke => |
| 39 [[new DefaultTransformer.asPlugin()]]; |
OLD | NEW |