包装的飞镖变压器

时间:2015-02-17 20:44:13

标签: dart transformer

我正在尝试制作一个也在包装上运行的飞镖变压器,但我无法弄清楚我目前是如何拥有以下

class MyTransformer extends Transformer implements LazyTransformer {
  MyTransformer.asPlugin();

  String get allowedExtensions => ".dart";

  void declareOutputs(DeclaringTransform transform) {
    // Just transforms a Dart file in place.
    transform.declareOutput(transform.primaryId);
  }

  Future apply(Transform transform) {
    //Only prints files that are in project how to include packages?
    print(transform.primaryInput.id.path);
    return //do work here
  }
}

先谢谢,我知道如何让它发挥作用

1 个答案:

答案 0 :(得分:0)

据我所知,目前尚不支持。有关详细信息,请参阅http://dartbug.com/18489(以及http://dartbug.com/20267