你如何让 Spine/Hem 渲染 Jade 模板?在文档的最后一行中,它说您只需将jade的runtime.js作为一个lib包含在slug.json中,但是当我这样做并运行我的应用程序时,我得到:
Uncaught ReferenceError: exports is not defined application.js:46
Uncaught ReferenceError: require is not defined
还有更多,还是我只是做错了什么?我使用npm来安装jade,所以我只是在我的slug.json中添加了路径,如下所示:
{
"dependencies": [
"es5-shimify",
"json2ify",
"jqueryify",
"spine",
"spine/lib/local",
"spine/lib/ajax",
"spine/lib/route",
"spine/lib/manager"
],
"libs": ["node_modules/jade/lib/runtime.js"]
}
谢谢