ripplejs / ripple

A tiny foundation for building reactive views
http://ripplejs.github.io
1.28k stars 66 forks source link

consistent plugin api #5

Open queckezz opened 10 years ago

queckezz commented 10 years ago

I think we should follow a consistent plugin api like how rework, component/model, builder.js does:

var View = ripple(tmpl)
  .use(refs())

// instead of 
  .use(refs)

that way the plugin maker can add options later on without breaking backwards compatibility. It's also a pain to find out which ones uses the first method and which ones the second, especially when you use many plugins at once. What do you think?

anthonyshort commented 10 years ago

Yeah that sounds good to me, mainly for backwards compatibility. I'll make the changes the various plugins.

bmcmahen commented 9 years ago

+1 on this. I like the standard refs(), even if it looks a bit less pretty.