bespokejs / bespoke

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

Must order bespoke-classes before bespoke-scale #56

Open phdesign opened 9 years ago

phdesign commented 9 years ago

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()
]);
mojavelinux commented 9 years ago

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.

hsablonniere commented 8 years ago

+1 The documentation needs to explain that.