1

在此处输入图像描述

我在 Webstorm 中使用 File Watchers 来调用批处理文件。此批处理文件包含一个 Ant 调用命令,如下所示:

call ant  "clean" "debug" "compress" -f C:\Users\cm\workspace2\Games\jsfiles\PokerGame\build\build.xml

每次我保存更改的 js 文件时,文件观察器都会触发,并且永远不会停止它的调用。

图为我在 Webstorm 中对 File Watcher 的配置。

我究竟做错了什么?

4

1 回答 1

2

just a supposition: the IDE sees the .js files generated by ant (as a result of 'compress' target running) and, as it watches .js files, runs the watcher again and again... Try excluding the directory where your minified files are created from watcher scope - create a new scope (Settings/scopes) with this folder excluded and then set this scope to your file watcher

于 2014-03-06T13:41:12.240 回答