html-next / flexi

Just a layout framework. Design for cross-platform with ease.
https://flexi.readme.io/docs
MIT License
219 stars 36 forks source link

Flexi layouts and Emblem #138

Closed mrship closed 5 years ago

mrship commented 6 years ago

We are using Emblem and would like to use Flexi Layouts. However, what we're seeing is the templates not rendering correctly, as it renders the emblem text directly into the layout.

In this simple demo repo - which is just ember, emblem and flexi-layouts - we have a setup thus:

layout

What we're seeing is a literal rendering of the emblem format.

= welcome-page = outlet

I asked on the Slack channel and @runspired suggested that this might be simple enough to fix. With the sample repo, perhaps someone could take a look and point me in the right direction, as I've not been able to get this to work as expected.

Thanks in advance for your time.

RobbieTheWagner commented 6 years ago

@mrship I'm not familiar with emblem, but is it safe to use anymore? I would expect it would be tough to keep using it as Ember has transitioned from Handlebars -> HTMLBars -> Glimmer -> Glimmer 2 -> Upcoming glimmerjs based templating.

It might be best to just use the built in supported syntax Ember provides here? If that is not an option, there may be a way to get things working, but I'm not aware of it myself.

mrship commented 6 years ago

Emblem compiles down to handlebars and has been working fine in our app. It's basically a simpler syntax - a bit like slim vs erb in Ruby. My hope was that the emblem/handlebars compiler would run first then the layout compiler would run once it had handlebars.

@runspired suggested via Slack that:

it’d likely be trivial to introduce emblem support to layouts, the rest of flexi not so much

Hopefully that is the case, but I'm not really sure where to start.

RobbieTheWagner commented 6 years ago

@mrship I don't know much about the AST magic that happens, but we split flexi-layouts into its own repo, if you'd like to poke around https://github.com/html-next/flexi-layouts

RobbieTheWagner commented 5 years ago

I do not know anything about Emblem, and we do not plan to support it, at this time, so I am closing this for now.