从Ant运行YUI压缩器时确定哪个文件有错误

从Ant运行YUI压缩器时确定哪个文件有错误,第1张

从Ant运行YUI压缩器时确定哪个文件有错误

我不知道yuicompressor的工作方式,我假设它一次只能处理一个文件。

如果是这样,则可以使用ant-contrib中的for来实现。您需要先安装ant-contrib。

<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${global.dir}/bin_data/ant-contrib-0.6.jar"/><for param="file">  <path>    <fileset dir="${global.dir}/" includes="**/*.js">      <exclude name="*.min.js" />    </fileset>  </path>  <sequential>    <echo>youcompressor for @{file}</echo> <!-- Will output each file and help debugging -->    <exec executable="yuicompressor"> <!-- I took the args from the official documentation-->      <arg value="--type=js" />      <arg value="-o" />      <arg value="'.js$:-min.js'" />      <arg value="@{file}" />    </exec>  </sequential></for>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/5622723.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-15
下一篇2022-12-15

发表评论

登录后才能评论

评论列表(0条)

    保存