TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

NewT.js - pure JS templating engine

10 点作者 gregory80将近 14 年前

2 条评论

anko将近 14 年前
this reminds me of superflyDOM: <a href="http://docs.jquery.com/Plugins/SuperFlyDOM/createAppend#elementattributeschildren" rel="nofollow">http://docs.jquery.com/Plugins/SuperFlyDOM/createAppend#elem...</a><p>I saw it used in a project once and it was a disaster. The problem being, by using javascript to represent html you are making your templates harder to write and harder to maintain.<p>This solution certainly has some cool features, but I strongly disagree with comparisons to haml. Where haml strips away a bunch of html syntactical weight, newt.js piles it on.<p>Sorry if i'm being too strong, but I just wanted to share my thoughts/experiences/criticism. It is clear the author has put a lot of work into this, including tests.<p>I like <a href="http://www.handlebarsjs.com/" rel="nofollow">http://www.handlebarsjs.com/</a> for my javascript templating because I can literally cut and paste in some html into a template, add some logic(if/then blocks) and I'm done.
评论 #2761297 未加载
评论 #2761208 未加载
taitems将近 14 年前
Using "clss" to avoid a conflict seems really clunky. className? @class?