Just in case, example: ant1<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/45480/
All Articles