You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In some Projects, I use HAML or Slim templates. It would be great if I could convert snippets from there to Phlex in one simple step.
Describe the solution you'd like
When pasting/typing into the ERB field, it would be nice to auto-detect the input format (ERB or HAML or Slim) and do the transformation to Phlex.
Instead of auto-detect, it could be aided by a format select box providing the available values.
One could try going directly from HAML to Phlex using e.g. https://github.com/LukeClancy/haml2phlex or from HAML to ERB e.g. using https://github.com/elia/haml2erb and then use the existing approach for ERB to Phlex. Another option might be integrating Tilt and changing its evaluation from executing to outputting the Ruby code.
The text was updated successfully, but these errors were encountered:
Do you want to spike this idea to see where it could go? I think I'd personally prefer the haml2erb way as a "pre-step" so we can leverage the whole remaining logic phlexing has around custom elements, Rails helpers, component names, method extraction etc.
thanks for the guidance regarding the pre-step. I already considered doing a spike but also wanted to post the request here to gauge interest, get recommendations like yours and of course because I'm lazy 😜.
I'll give it a shot, but if anybody wants to take this, please go ahead.
Is your feature request related to a problem? Please describe.
In some Projects, I use HAML or Slim templates. It would be great if I could convert snippets from there to Phlex in one simple step.
Describe the solution you'd like
When pasting/typing into the ERB field, it would be nice to auto-detect the input format (ERB or HAML or Slim) and do the transformation to Phlex.
Instead of auto-detect, it could be aided by a format select box providing the available values.
One could try going directly from HAML to Phlex using e.g. https://github.com/LukeClancy/haml2phlex or from HAML to ERB e.g. using https://github.com/elia/haml2erb and then use the existing approach for ERB to Phlex. Another option might be integrating Tilt and changing its evaluation from executing to outputting the Ruby code.
The text was updated successfully, but these errors were encountered: