I would really like to try out a “component”-based approach with Middleman. Is it possible to get Phlex working? I tried to set it up, but got stuck. These were my steps:
- include the
- create a demo component
in components/hello.rband an empty class in
- require both from the
- render the component with
= render Components::Hello.new
But then I got a contract violation error for the
It seems like Middleman’s internal type system kills the interoperability here. Is that correct? Could I simply monkey patch that away for a proof of concept?
Ideally I would like to achive a flat folder structure with all my components in the end:
Non-component JS and CSS could still remain in the
stylesheets/ folders. Apart from getting Phlex to work at all, that would also require a fair bit of hackery for the autoloading.
Do you think this is doable?