-
![image](https://cloud.githubusercontent.com/assets/14817820/16612365/39f2d02a-4399-11e6-9913-061594439fbd.png)
编译后的文件变成这样子的路径了,怎么破!!!!
-
如果想在模板中使用全局函数,需要在 template.helper中重新定义一次,有些设计缺陷。
不过找到了修复这个缺陷的解决方案:
第一:修改源代码
// ============================
} else if (helpers[name]) {
value = "$helpers." + name;
// 全局函数,这里只处理函数,不处理变量,因为有可能全局变量…
-
``` javascript
var tmodjs = require('gulp-tmod');
gulp.task("tmod",function(){
gulp.src('./static/js/**/*.html')
.pipe(tmodjs({
templateBase: './static/js/'
}))
…
cylzh updated
8 years ago
-
我在gulp里面这样用:
gulp.task("test", funttion(){
return gulp.src(["template/comment/*.html"])
.pipe(tmodjs({
"templateBase": "./template/comment",
"c…
-
-。- 大神早上好。
是这个情况,
![image](https://cloud.githubusercontent.com/assets/7599351/8027048/62337b3e-0dc1-11e5-90f6-8d550d549944.png) boby 这里返回html 的话 在开发中有些时候 改起内容来不是很好改,然后我就想在是不是可以利用xhr 加载的原理 所以就自己尝…
-
换成新版本后,我发现所有的模板会编译成一个template.js,以前基础库和模板编译的js是分开的,现在合成了一起成为template.js,那我在代码里如何引用呢,commonjs的引入方式
以前使用方式:
var testTpl = require('./tpl/test')
testTpl(data)
现在合并在一起了,module.exports应该只能导出一个模板function,…
-
gulp不是应该返回流么?但是这个插件只能在选项里写好输出目录直接就输出成文件了。。。导致不能和其他插件兼容做更多自定义处理,比如:文件名名字自定义,后续文件合并等等。
除非确实是只需要输出js文件自己去引用的那种才能正常使用。。。
-
## 数据
``` javascript
var data = {
msg:'succ',
result:[{
name:'john',
age:23
},{
name:'monkia',
age:20
}]
}
```
## html模板片段
``` javascri…
jyjin updated
8 years ago
-
我webpack的resolve配置如下
resolve:{
root:[path.join(__dirname,'js'),path.join(__dirname,'dep')],
extensions:['.js','.less','','.html'],
modulesDirectories:['node_…
-
请问该插件能生成seajs所能使用的JS文件吗