Closed DartBot closed 9 years ago
Comment by sigmundch
The proper fix is simple:
Then you can just say:
transformers:
Changed the title to: "observe transform should be usable from pub".
Comment by munificent
- mypackage/observe_transformer.dart # skip the 'lib' here, this is like a package: import
You don't need the ".dart" there either. :)
Issue by jmesserly Originally opened as dart-lang/sdk#14888
quoting siggi to web-ui list:
Almost, but not quite, we should open a bug for this.
By default pub would let you say 'observe' to mean "observe/transformer.dart', but in package:observe this file doesn't exist. Pub let's you specify a specific path, so instead of 'observe' you can say:
transformers:
However, the file you specify needs to have a plugin API (a transformer with a constructor named .asPlugin). We have these in polymer, but not in observe. You can add one yourself in your package instead:
mypackage/lib/observe_transformer.dart:
class WorkAround extends ObservableTransfomer {
WorkAround.asPlugin() : super(); }
Then use this instead in your pubspec: transformers: