我想在节点上使用小胡子,但由于某种原因,局部不起作用:我创建了2个文件,app.js并且test.mustache都在同一个目录中.使用package.json文件和npm我为这个项目安装了最新版本的胡子.文件看起来像这样:
app.js:
var mus = require('mustache');
console.log(mus.render('test.mustache: {{>test}}'));
Run Code Online (Sandbox Code Playgroud)
test.mustache:
This is a test
Run Code Online (Sandbox Code Playgroud)
如果我跑,node app.js我希望得到以下输出:test.mustache: This is a test,但我得到:test.mustache:.
其他小胡子标签按预期工作,即使是胡子的誓言测试也不会报告任何错误.
我该怎么做才能让它正常工作?
| 归档时间: |
|
| 查看次数: |
921 次 |
| 最近记录: |