Closed mcollina closed 10 years ago
Thanks for the pull request! This plugin looks awesome.
I'm going to hold off on this for now because a new version of Bespoke.js is imminent and the plugin API is changing. I'm thinking of putting together a wiki article on migrating plugins from v0.4 to v1.0, but in the meantime, check out the following links:
You can scaffold a v1.0 plugin by installing the beta version of generator-bespokeplugin: $ npm install -g generator-bespokeplugin@beta
Impressive refactoring, I love the new AMD-style thing. But I'm :scream: at the idea of refactoring my plugins! :D
It's not too bad :)
Old:
bespoke.plugins.foobar = function(deck, options) {
...
};
New:
module.exports = function(options) {
return function(deck) {
...
};
};
The rest of the work is in the build process, but the updated version of generator-bespokeplugin will take care of setting that up for you :)
@markdalgleish: sweet! Seem to recall having some structuring issues that could be fixed with AMD =)
@joelpurra Yeah, your plugins were the first sign that maybe I'd need a more robust plugin system.
Coverage remained the same when pulling 6b8c6f087504619f687fc66fe3ea8e1f9b15169f on mcollina:patch-4 into ef47bf37fbd3c4bd24c383a432fde16ae116f7bf on markdalgleish:master.