pupper syntax is based in pug.
It is very semantical and natural to write in pupper. Tag and attributes look similar to HTML, but with commas separating the attributes. Their values are just regular JavaScript.
a(href="//google.com") Google
Normal JavaScript works fine with components:
template
body(class=authenticated ? "authed" : "anon")
data
authenticated = false
If you have many attributes, you can also spread them across many lines:
input(
type="checkbox",
name="agreement",
checked
)
!>
You can use template literals for syntax attributes.
This is very useful for attributes with really long values:
input(data-very-long-json=`
{
"very-long": "piece of ",
"data": true
}
`)