fis
fis copied to clipboard
在 Windows 7 环境中 fis release --watch 完全没有用啊!!!
同样的 fis-conf.js 配置,在 Mac OS X 下运行 fis release --watch 没有问题,但是在 Windows 7 下面始终没有办法 watch,尝试过添加 fis.config.set('project.watch.usePolling', true); 也没有用。
在两台 Win 7 机器上均如此,于是我在 Mac OSX 里安装了一个 Win 7 虚拟机,干净环境安装 node / fis,拉取代码,运行 fis release --watch,结果还是改了源代码,watch没反应,我要崩溃了,到底怎么回事?
运行的命令为:
fis server start -p 20000 --root ./_fis_debug
fis release --watch --live -d debug
fis-conf.js 代码如下:
var appVersion = "20150630";
fis.config.set('project.include', [
'app/**',
'bower_components/**',
'content/**',
'infrastructure/**',
'samples/**',
'*.html',
'*.ico'
]);
fis.config.merge({
roadmap: {
path: [{
reg: 'content/**',
release: appVersion + '/$&'
}, {
reg: 'app/**',
release: appVersion + '/$&'
}]
},
deploy: {
//debug mode
debug: {
exclude: [
/\/app\/scripts\//i,
/\/app\/styles\//i,
/\/app\/views\/doc\//i,
/\/bower_components\//i,
/\/infrastructure\//i,
/\/pafboots\//i,
],
to: './_fis_debug'
}
}
});
我就想知道,在 windows 下为什么 --watch 完全不起作用! T___T
复现后修复
@xiangshouding 有没有qq或者微信沟通...
另外,版本是 v1.9.28
在线等解决,或者诊断是什么问题?
@xiangshouding
我去掉 fis-conf.js 文件就可以watch了。至少暂且说明,同样的配置文件,同样版本的 fis,在 mac 和 windows 下得行为有差异?
fis v1.9.8 window 64 位机器,表示 watch 没问题啊。把你项目分享出来,让我试试。
重现了
经过我的艰苦尝试,我发现问题出在
fis.config.set('project.include', [
'app/**',
'bower_components/**',
'content/**',
'infrastructure/**',
'samples/**',
'*.html',
'*.ico'
]);
windows下,这一段注释掉,watch就生效了。而我修改的文件是 app/views/index.html
@xiangshouding 有什么想法?
@2betop 见上一条
已经定位到问题了, 我们用到的第三方 watch 插件,在 mac 和 windows 下表现不一致。需要调整判断逻辑。后续修复会这通知你。
@2betop 是否只是影响到 project.include ?