bespokejs / bespoke

DIY Presentation Micro-Framework
http://markdalgleish.com/projects/bespoke.js/
MIT License
4.69k stars 442 forks source link

Added bespoke-camera plugin to the README. #41

Closed mcollina closed 10 years ago

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 6b8c6f087504619f687fc66fe3ea8e1f9b15169f on mcollina:patch-4 into ef47bf37fbd3c4bd24c383a432fde16ae116f7bf on markdalgleish:master.

markdalgleish commented 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

mcollina commented 10 years ago

Impressive refactoring, I love the new AMD-style thing. But I'm :scream: at the idea of refactoring my plugins! :D

markdalgleish commented 10 years ago

It's not too bad :)

Old:

bespoke.plugins.foobar = function(deck, options) {
  ...
};

New:

module.exports = function(options) {
  return function(deck) {
    ...
  };
};
markdalgleish commented 10 years ago

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 :)

joelpurra commented 10 years ago

@markdalgleish: sweet! Seem to recall having some structuring issues that could be fixed with AMD =)

markdalgleish commented 10 years ago

@joelpurra Yeah, your plugins were the first sign that maybe I'd need a more robust plugin system.