Open liyatang opened 9 years ago
问题解决没?
多谢关注。问题还没有解决,求指导。 我Q 531059158
同样的问题,现在只好用 tmod 的命令行来监视并 build
不好意思,工作原因不在使用tmod了,对于目前碰到的问题暂时没有精力去解决,如果大家能解决问题可以提pr。
抱歉!
我也遇到这个问题,目前写的是这样子:
gulp.watch([path.join(tpl.src, '*/.html')]).on('change', function (event) {
if (event.type === 'changed') {
console.log("动态编译模板...",event.path);
gulp.src(event.path)
.pipe($.tmod({
base: tpl.src,
combo: true,
cache:false,
type:"cmd",
output: tpl.dist
}))
}
});
改动之后有监视到变化 也有执行操作,但是编译就是失败了。。。我也没看出来问题到底在哪儿
我看了下tmod的源码 它自己带有watch功能 可看https://github.com/aui/tmodjs/blob/master/bin/tmod#L207 不明白作者为啥没加 我把这行代码加到作者的gulp插件里边去(注意加到生成的tmod实例后面) 亲测可用 不过这样就直接开启了实时监控的功能了 可以在option里加一个参数用来控制是否开启
你好,使用 gulp-tmod 中遇到了点问题,求指导。
我这样用是ok的
问题来了...
然后我要使用watch。 完全按照readme的使用哦。
然后就报bug了
从提示上来看是gulp-watch 的参数问题,于是修正如下(给watch加了第一个参数)。
还是有错误
然后我看了官网(https://github.com/floatdrop/gulp-watch)gulp-watch的用法,改为
没有报错
可是我修改模板,并没有执行编译
求助,我应该怎么写