5 ms·
As a person who plays around with Node, has used (and hated) Jade, thank you thank you for doing this. I wanted Jinja for javascript so bad, and EJS simply did
by JPKab 14y ago
As a person who plays around with Node, has used (and hated) Jade, thank you thank you for doing this. I wanted Jinja for javascript so bad, and EJS simply didn't deliver what I wanted.
Let me quickly state something about Jade: I think it's great for those whose philosophy is "as little typing as possible." For me, my goal is simplicity, not minimal typing. That's why I don't like Jade. I can take a Jinja template, show it to somebody who only knows HTML, and they can figure it out rather quickly. Jade, not so much.
- jlongster 14y agoThat's exactly how I feel. I think Jade is awesome, just not my cup of tea. I know several people that love it. After developing node apps for a year, I'm tired of constantly battling my templates. I hope that this benefits others as well!
- lowboy 14y agoI am a proponent of ALTAP and of using significant whitespace such as Python and Haml so I appreciate Jade's style. Although I can see the utility of being close to HTML, the jump to simple Jade or Haml shouldn't be that bad for a competent developer.
- insin 14y agoYou might also be interested in: https://github.com/deoxxa/node-ginger https://github.com/deoxxa/node-ginger https://github.com/chrisdickinson/plate https://github.com/chrisdickinson/plate https://github.com/paularmstrong/swig https://github.com/paularmstrong/swig Sounds like my reasons for liking Jade are the same as yours for not liking it: simplicity, but for me, as opposed to someone who only knows HTML. The trade-off for requiring less typing in some cases (which is a bonus, but not a goal) via significant whitespace and being element-based is having many fiddly moments trying to get whitespace to appear between elements where its lack affects the layout. I've loved Django's template inheritance since I first laid my eyes on their template docs in the magic-removal days, so once Jade added the same sort of inheritance - plus conveniences like "append" for adding to blocks in parent templates - the deal was pretty much sealed for my Node.js projects. Form rendering and other truly display logic is the point where I part with the appreciation Django gave me for designer-friendly templates which just can't do logic beyond the basics. Jade's mixins, effectively being functions which can only return elements, but allowing you to optionally pass in arguments, attributes and a block of elements, and use JavaScript logic, are getting me most of the way there when using my JavaScript port of django.forms, without having to step outside the templating system.