[JavaScript] 配置JavaScript BUILD

<project name="eForm" default="concatenate">
  <tstamp>
<format property="build.time"
pattern="MMM/dd/yyyy hh:mm:ss"
locale="en,US"/>
</tstamp>

<property name="src.dir" location="C:\Seamas\Projects\eForm\src"/>
<property name="build.dir" location="C:\Seamas\Projects\eForm\build"/>
<property name="lib.dir"  location="C:\Seamas\Projects\js.build"/>

<property name="yuicompressor"  location="C:\Seamas\Projects\js.build\yui\yuicompressor\yuicompressor-2.4.jar"/>
  

<property name="jsdoc.dir"  location="C:\Seamas\Projects\js.build\jsdoc"/>
<property name="jsdoc"  location="${jsdoc.dir}\jsrun.jar"/>
<property name="jsdoc.run"  location="${jsdoc.dir}\app\run.js"/>
<property name="jsdoc.templates"  location="${jsdoc.dir}\templates\jsdoc"/>
<property name="jsdoc.output"  location="${build.dir}\docs"/>



<loadfile property="license" srcfile="${src.dir}\license.txt" />

  <target name="concatenate"> 
<concat destfile="${build.dir}\build.js" fixlastline="yes" eol="lf">
  <header trimleading="yes">/*! 
${license}
*/
/* build time: ${build.time} */</header>
        <fileset dir="${src.dir}" includes="*.js" />
    </concat>
  </target>




<target name="minify">
<apply executable="java" failonerror="true">
<fileset dir="${build.dir}" includes="*.js"/>
<mapper type="glob" from="*.js" to="${build.dir}/*-min.js"/>
<arg line="-jar"/>
<arg path="${yuicompressor}"/>

<srcfile/>
<arg line="-o"/>
<targetfile/>
</apply>
</target>




<target name="document">
<apply executable="java" failonerror="true" parallel="true">
<fileset dir="${src.dir}" includes="*.js" />
<arg line="-jar"/>
<arg path="${jsdoc}"/>
<arg path="${jsdoc.run}" />
<arg line="-t=${jsdoc.templates}" />
<arg line="-d=${jsdoc.output}" />
<srcfile/>
</apply>
</target>

</project>

 这篇blog,仅仅是个人参考....后续会有继续的更新,这个是Version 1.0

 

jslint and ANT

references:

http://505253293.blog.163.com/blog/static/268991672013183407272/

http://www.myexception.cn/web/422928.html

http://kaatz-media.com/2011/10/06/uberprufen-von-javascript-dateien-ant-und-jslint-jenkins-using-ant-on-jenkins-for-jslint/

http://code.google.com/p/jslint4java/

http://www.gototheboard.com/articles/Running_JSLint_With_Your_Ant_Build

 

http://mattsnider.com/using-ant-to-consolidate-css-and-javascript/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值