bespokejs / bespoke

DIY Presentation Micro-Framework

Home Page:http://markdalgleish.com/projects/bespoke.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Must order bespoke-classes before bespoke-scale

phdesign opened this issue · comments

When using the bower versions of bespoke plugins, the order of plugins becomes important. If you specify bespoke-scale before bespoke-classes scaling won't work. e.g.

bespoke.from('article', [
    bespoke.plugins.bullets('li, .bullet'),
    bespoke.plugins.backdrop(),
    bespoke.plugins.scale(),
    bespoke.plugins.hash(),
    bespoke.plugins.progress(),
    bespoke.plugins.classes(),
    bespoke.plugins.state(),
    bespoke.plugins.keys(),
    bespoke.plugins.touch()
]);

won't work but this will:

bespoke.from('article', [
    bespoke.plugins.classes(),
    bespoke.plugins.bullets('li, .bullet'),
    bespoke.plugins.backdrop(),
    bespoke.plugins.scale(),
    bespoke.plugins.hash(),
    bespoke.plugins.progress(),
    bespoke.plugins.state(),
    bespoke.plugins.keys(),
    bespoke.plugins.touch()
]);

The examples in the README show the plugins applied in the working order (i.e., classes() before all other plugins). Perhaps this point just needs to called out in the README (and perhaps in the description of the classes plugin).

It makes sense why this is the case. The classes plugin provides critical foundation that many other plugins rely on. In fact, in some ways, the classes plugin is an extension of core. I agree it should be a plugin in order to ensure maximum flexibility and reusability of bespoke.js, but it's reasonable to emphasize just how important this plugin is to the ecosystem.

+1 The documentation needs to explain that.