lukeed / taskr

A fast, concurrency-focused task automation tool.
MIT License
2.54k stars 73 forks source link

plugin development? #146

Closed ralyodio closed 8 years ago

ralyodio commented 8 years ago

Are there any instructions for developing a plugin to add support for an npm module?

I want to convert dot.js to work with fly, but its unclear how you make a module "flyable".

I get the error .target not found when I try to chain.

lukeed commented 8 years ago

Yes indeed. https://github.com/bucaran/fly/blob/master/docs/README.md#plugins

Good rule of thumb:

If the API method you're wrapping depends on files' contents, use a filter. And if the API function is thennable / already a Promise, use a defer. Otherwise (aka: your API method wants a files glob) nest your plugin directly into the Fly instance, returning this.