A rewrite! viewloader now matches on custom named data attributes.

Hey Ben,

Took a day or two longer than I’d hoped, but here’s that pull request :) It’s all in line with that gist, but you might want to test that things are working as expected.

Cheers,
Max

****

`data-view-thing` will match a setup function named `thing` in whatever object is passed to `viewloader.execute`. This has the added advantage of being able to pass data to the function through the attribute value, `<div data-view-thing="foo"/>`, which will be passed as a third argument (props).