[JavaScript] 配置JavaScript BUILD
2024-09-20 00:08:17
<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/
最新文章
- 农业银行快捷支付php版说明和实例代码
- nexus7 二代 升级 android L
- 105 董婷婷 第一次Sprint总结
- vim常用操作
- linux atom 不支持中文
- C# 执行JS
- gson在java和json串之间的应用
- OC动态特性
- 8VC Venture Cup 2016 - Elimination Round (C. Block Towers)
- Kernel compiling for Pi 2
- ural 1136. Parliament
- S3C2440 时钟设置分析(FCLK, HCLK, PCLK)
- 前后端分离--ajaxUpload异步上传文件成功,前端获取数据却失败的解决方案
- 15. Life Cycle of the Products 产品的生命周期
- Confluence 6 管理员联系表单的后台配置界面
- What is the name of the “--&;gt;” operator?(Stackoverflow)
- access数据库 配置路径
- 基于easyui开发Web版Activiti流程定制器详解(二)——文件列表
- 洛谷 P1306 斐波那契公约数
- HDU 2102 A计划 (深搜)