Jade用得很鬱悶,換ejs嗎?
Jade格式好像對縮進很敏感似的,在jade文件裡放一下html標籤後,總是會報錯。 不知道大家使用Jade後,有沒有什麼心得可以分享,難道要逼我用ejs,其實我很喜歡jade的簡潔的。
18 回复
我用 jade 的一个心得是把网页的不同部分拆成几个文件,一方面是模块化,一方面也可以减少缩进的深度,防止套错了层。另外我好像还没有遇到非要用原始的 html 标签的情况。
@saighost Mac OS X 10.6 提示这个错误:
> contextify@0.1.3 install /usr/local/lib/node_modules/html2jade/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
info it worked if it ends with ok
info downloading: http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
ERR! UNCAUGHT EXCEPTION:
ERR! Error: UNKNOWN, unknown error '/Users/ELSA/.node-gyp/0.6.8'
ERR! This is a bug in `node-gyp`. Please open an Issue:
ERR! https://github.com/TooTallNate/node-gyp/issues
ERR! not ok
npm WARN optional dependency failed, continuing contextify@0.1.3