4 ms·
I guess it would be useful for programmatically building the DOM tree. But for writing DOM fragments, pug[1] is also an option. I happen to like the clean-looki
by athenot 9y ago
I guess it would be useful for programmatically building the DOM tree. But for writing DOM fragments, pug[1] is also an option. I happen to like the clean-looking syntax. Transposing their example:
body
h1 Hello World
input(type='range')
input(onclick='console.log') Log event
ul
li 1
li 2
li 3
unless false
span Hidden
[1] https://pugjs.org/api/getting-started.html https://pugjs.org/api/getting-started.html
- natbobc 9y agoLooks a lot like slim [1] or even it's grand-daddy HAML [2] [1] http://slim-lang.com/ http://slim-lang.com/ [2] http://haml.info/ http://haml.info/
- ricardobeat 9y agoPUG used to be called 'Jade', and was basically HAML-for-nodejs.