【问题标题】:Precompiling Handlebars with grunt-contrib-handlebars version issue使用 grunt-contrib-handlebars 版本问题预编译 Handlebars
【发布时间】:2015-09-05 18:16:37
【问题描述】:
我刚刚尝试为 grunt 和车把设置预编译器。访问我的模板时出现此错误:
Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 4.0.0) or downgrade your runtime to an older version (>= 2.0.0-beta.1).
有人知道怎么解决吗?
【问题讨论】:
标签:
gruntjs
handlebars.js
【解决方案1】:
没关系,我认为 Grunt 的插件已经过时了。如果我错了,请随时纠正我。
我用grunt-shell,只是用shell编译它们(使用node更新车把版本后)....
shell: {
options: {
stderr: false
},
handlebars: {
command: 'node_modules/handlebars/bin/handlebars src/templates/*.handlebars -f dist/js/templates.js'
}
},