-
Notifications
You must be signed in to change notification settings - Fork 0
Description
From @miketamis on November 24, 2018 0:40
We need more ways of getting variables ie applying transforms but also just different forms.
I have done this in a hack y way at the moment with HTL language, if you have a morph file like
<js>
const properties = { myVar: "world" }
</js>
<example.htl>
<div>hello ${properties.myVar}</div>
</example.htl>
you can use example as a variable and you would get
<div>hello world</div>but what if you wanted the HTL its self ie your deploying it to AEM or doing some other sort of proccessing on the raw code.
currently you can do example_raw and it will give you
<div>hello ${properties.myVar}</div>
I personally don't like having foo_raw one this means that if you create a variable with _raw at the end its confusing but two its just not obvious that its a transformation.
maybe instead a syntax like
// current
${ example_raw }
//ideas
${ example @raw }
${ example#raw }
${ raw`example` }
${ raw^example }
im very much open to other ideas and votes.
Copied from original issue: miketamis/morph-extension#14