-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
velocity模板可以是.html后缀的吗 #7
Comments
jello 里面不是用的他,而是 fis.match('*.html', {
preprocessor: fis.plugin('extlang', {
type: 'velocity'
})
}) |
可是我用了之后报错:[ERROR] preprocessor.extlang: Cannot read property 'unshift' of undefined [E:/jello-fis-practice/page/page.html] |
编译的时候带上 |
58@58-PC MINGW32 /e/mygithub/jello-fis-practice [DEBUG] 12:33:55.039 Resolved module jello to C:\Users\58\AppData\Ro aming\npm\node_modules\fis3-jello\index.js [INFO] Currently running fis3 (C:\Users\58\AppData\Roaming\npm\node_ modules.fis3_npminstall\fis3\3.4.17\fis3) [DEBUG] 12:33:55.059 Resolved module command-release to C:\Users\58\ AppData\Roaming\npm\node_modules.fis3_npminstall\fis3\3.4.17\fis3\no de_modules\fis3-command-release\index.js [DEBUG] 12:33:55.255 revert cache [DEBUG] 12:33:55.256 cache file exists [DEBUG] 12:33:55.257 cache info read [DEBUG] 12:33:55.257 cache is expired δ 5ms Ω [DEBUG] 12:33:55.304 Resolved module hook-commonjs to C:\Users\58\Ap pData\Roaming\npm\node_modules\fis3-jello\node_modules\fis3-hook-comm onjs\index.js [DEBUG] 12:33:55.465 compile [E:/mygithub/jello-fis-practice/page/in dex.vm] start [DEBUG] 12:33:55.466 revert cache [DEBUG] 12:33:55.467 cache is expired [DEBUG] 12:33:55.471 Resolved module preprocessor-extlang to C:\User s\58\AppData\Roaming\npm\node_modules\fis3-jello\node_modules\fis3-pr eprocessor-extlang\index.js [DEBUG] 12:33:55.482 pipe [preprocessor.extlang] start [DEBUG] 12:33:55.488 pipe [preprocessor.extlang] end [DEBUG] 12:33:55.488 pipe [standard.builtin] start [DEBUG] 12:33:55.488 builtin standard for [E:/mygithub/jello-fis-pra ctice/page/index.vm] start [DEBUG] 12:33:55.510 builtin standard for [E:/mygithub/jello-fis-pra ctice/page/index.vm] end [DEBUG] 12:33:55.510 pipe [standard.builtin] end [DEBUG] 12:33:55.510 postStandard start [DEBUG] 12:33:55.518 postStandard end [DEBUG] 12:33:55.518 Save cache [/page/index.vm] start [DEBUG] 12:33:55.522 Save cache [/page/index.vm] end [DEBUG] 12:33:55.522 compile [E:/mygithub/jello-fis-practice/page/in dex.vm] end [DEBUG] 12:33:55.522 E:/mygithub/jello-fis-practice/page/index.vm [DEBUG] 12:33:55.526 compile [E:/mygithub/jello-fis-practice/page/pa ge.html] start [DEBUG] 12:33:55.527 revert cache [DEBUG] 12:33:55.527 cache is expired [DEBUG] 12:33:55.528 pipe [preprocessor.extlang] start [DEBUG] 12:33:55.530 pipe [preprocessor.extlang] fail [ERROR] preprocessor.extlang: Cannot read property 'unshift' of unde fined [E:/mygithub/jello-fis-practice/page/page.html] [DEBUG] 12:33:55.532 TypeError: preprocessor.extlang: Cannot read pr operty 'unshift' of undefined [E:/mygithub/jello-fis-practice/page/pa ge.html] C:\Users\58\AppData\Roaming\npm\node_modules.fis3_npminstall\fis3-co mmand-release\1.3.8\fis3-command-release\lib\release.js:86 TypeError: preprocessor.extlang: Cannot read property 'unshift' of un defined [E:/mygithub/jello-fis-practice/page/page.html] |
用jello-demo试了一下,发现将.vm换成.html再配置上 |
不能生效是啥意思?什么表现 |
数据绑定不了,页面加载只有部分html标签,其他vm都加载不了 |
那当然啦,jello 预览环境只认 vm 文件,你是为何要用 html 后缀呢?如果功能都要求一样为何不直接一个 vm 后缀,如果只是因为后端限制,大不了产出给后端的时候变成 html 后缀。 |
好吧,谢谢你,终于明白了。 |
fis.match('*.html', {
parser: fis.plugin('vm')
});
用了fis3-parser-vm
但报错了
[ERROR] parser.vm: Call undefined macro. [E:/mygithub/jello-fis-practice/page/page.html]
然后我换成fis3-parser-velocity,数据绑定不了,请大神指示
The text was updated successfully, but these errors were encountered: