クライアントの最適化を自動化する

背景

ご存知のように、サイトを公開する前に開発を行っています。 そして、奇妙なことに、開発者のマシンでこれを行います。 また、開発中にjavascript(場合によってはcss)を複数のファイルに保存する方が便利であることが長い間指摘されています。問題は、記事「Webサイトの 高速化の ベストプラクティス 」に記載されている原則に従って、サイトの読み込みを高速化するには、javascriptファイルとcssファイルで次の操作を実行する必要があります。
  1. すべてのjavascriptを1つのファイルにマージします。望ましい順序(jQueryライブラリなど)が先頭に近づき、それを使用する関数とオブジェクトがその後になるようにすることが望ましいです。
  2. すべてのcssを1つのファイルにマージします
  3. yui-compressorなどのユーティリティを使用して、これらの大きなファイルを圧縮します(名前が、たとえば、data:URLを含むie_プレフィックスで始まるcssファイルを除く。したがって、行から行への遷移に不可欠です。あなた自身の安心のためにそれらを圧縮しない方が良いです)
  4. この順序で並べます-cssファイルは開始タグの先頭にできるだけ近く、jsファイルは終了タグの本体にできるだけ近くにあります。
  5. ユーザーのブラウザがそれらをキャッシュするように、expires HTTPヘッダーをより長く設定します。 ユーザーが次のビルドでjsとcssを更新するには、これらのファイルに一意の名前を付ける必要があります。
  6. クライアントにファイルを送信する前に、gzipを使用してそれらを圧縮します

なんで?

ポイント5と6は他の 場所ですでに詳細です。

この記事では、アイテム1、2、3、4の自動化の問題を検討します。 より正確には、ボタンをクリックするだけでこのリストのステップ1、2、3、4を実行し、javascriptおよびcssファイルをサーバーにアップロードする準備ができるツール(最大2つまたは3つ)を提供したいと思います。

ツールキット

スクリプト操作アルゴリズム

  1. JSLint4JavaおよびYUI Compressorをダウンロードして解凍し、プロジェクト内のtoolsフォルダーに配置します。 もちろん、$ TOOLS_LOCATIONのようなシステム変数で定義された場所のどこかに置く方がより正確ですが、デモスクリプトでも実行できます。必要に応じてスクリプトを自分で修正できます。
  2. すべてのjsファイルにJSLint4Javaを設定します。 JSLintがエラーを見つけた場合は、画面にエラーを表示してスクリプトを停止します。
  3. 他の場所で定義するファイルの順序を保持しながら、フレーズテストの名前のファイルを除くすべてのjsファイルを一意の名前を持つ1つのファイルにマージします。 一意の名前として、main.hh.dd.MM.yy.jsという構造を取りましょう。ここで、hh、dd、MM、yyは、それぞれ現在の時間、日、月、年です。
  4. ie_で始まる名前を除くすべてのcssファイルを一意の名前を持つ1つのファイルにマージします(名前は前の段落と同じで、拡張子のみが `css`に変更されます)。 この場合の順序は重要ではありません。
  5. 結果のYUI Compressorファイルを設定します。 圧縮中にエラーが発生した場合は、エラーを表示してスクリプトを停止します。
  6. すべてのスタイルファイルを含むhtmlテンプレートで、ie_ファイルを含むsrcおよびスタイルルールを含むsrcを除くすべてのリンクタグを削除し、src属性を使用して外部cssファイルを接続しません。
  7. 同じテンプレートで、javascriptコードを含む(src属性を介して外部スクリプトファイルを含まない)スクリプトタグを除くすべてのスクリプトタグを削除します。
  8. 同じテンプレートで、結果のcssファイルを開始headタグのできるだけ近くに規定します。
  9. 同じテンプレートで、終了タグの本体にできるだけ近い結果のjsファイルまたは開始タグスクリプトの結果のjsファイルを指定します...この奇妙な動作は、このために必要です。 htmlファイルでは、いくつかのデータを使用してサーバー側コードでjsオブジェクトを直接初期化します。 そのためには、スクリプトタグを保存し、結果のjsファイルを添付する必要があります。
  10. 結果のjs、css、htmlファイルをディレクトリに展開します。

実装例

<? 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 .



  1. <? 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 .



  2. <? 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 .



  3. <? 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 .



  4. <? 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 .



  5. <? 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 .



  6. <? 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 .



  7. <? 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 .



  8. <? 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 .



  9. <? 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 .



  10. <? 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 .



  11. <? 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 .



  12. <? 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 .



  13. <? 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 .



  14. <? 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 .



  15. <? 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 .



  16. <? 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 .



  17. <? 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 .



  18. <? 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 .



  19. <? 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 .



  20. <? 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 .



  21. <? 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 .



  22. <? 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 .



  23. <? 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 .



  24. <? 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 .



  25. <? 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 .



  26. <? 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 .



  27. <? 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 .



  28. <? 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 .



  29. <? 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 .



  30. <? 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 .



  31. <? 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 .



  32. <? 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 .



  33. <? 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 .



  34. <? 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 .



  35. <? 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 .



  36. <? 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 .



  37. <? 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 .



  38. <? 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 .



  39. <? 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 .



  40. <? 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 .



  41. <? 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 .



  42. <? 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 .



  43. <? 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 .



  44. <? 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 .



  45. <? 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 .



  46. <? 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 .



  47. <? 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 .



  48. <? 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 .



  49. <? 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 .



  50. <? 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 .



  51. <? 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 .



  52. <? 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 .



  53. <? 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 .



  54. <? 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 .



  55. <? 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 .



  56. <? 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 .



  57. <? 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 .



  58. <? 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 .



  59. <? 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 .



  60. <? 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 .



  61. <? 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 .



  62. <? 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 .



  63. <? 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 .



  64. <? 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 .



  65. <? 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 .



  66. <? 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 .



  67. <? 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 .



  68. <? 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 .



  69. <? 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 .



  70. <? 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 .



  71. <? 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 .



  72. <? 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 .



  73. <? 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 .



  74. <? 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 .



  75. <? 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 .



  76. <? 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 .



  77. <? 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 .



  78. <? 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 .



  79. <? 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 .



  80. <? 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 .



  81. <? 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 .



  82. <? 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 .



  83. <? 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 .



  84. <? 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 .



  85. <? 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 .



  86. <? 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 .



  87. <? 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 .



  88. <? 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 .



  89. <? 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 .



  90. <? 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 .



  91. <? 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 .



  92. <? 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 .



  93. <? 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 .



  94. <? 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 .



  95. <? 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 .



  96. <? 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 .



  97. <? 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 .



  98. <? 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 .



  99. <? 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 .



  100. <? 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 .



  101. <? 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 .



  102. <? 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 .



  103. <? 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 .



  104. <? 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 .



  105. <? 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 .



  106. <? 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 .



  107. <? 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 .



  108. <? 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 .



  109. <? 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 .



  110. <? 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 .



  111. <? 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 .



  112. <? 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 .



  113. <? 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 .



  114. <? 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 .



  115. <? 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 .



  116. <? 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 .



  117. <? 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 .



  118. <? 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 .



  119. <? 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 .



  120. <? 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 .



  121. <? 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 .



  122. <? 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 .



  123. <? 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 .



  124. <? 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 .



  125. <? 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 .



  126. <? 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 .



  127. <? 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 .



  128. <? 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 .



  129. <? 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 .



  130. <? 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 .



  131. <? 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 .



  132. <? 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 .



  133. <? 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 .



  134. <? 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 .



  135. <? 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 .



  136. <? 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 .



  137. <? 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 .



  138. <? 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 .



  139. <? 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 .



  140. <? 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 .



  141. <? 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 .



  142. <? 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 .



  143. <? 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 .



  144. <? 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 .



  145. <? 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 .



  146. <? 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 .



  147. <? 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 .



  148. <? 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 .



  149. <? 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 .



念のため、例: ant1

藤堂

  1. スクリプト内でjsファイルの連結順序を直接指定するのはあまり美しくありません。 <%javascript:{first:jquery、last:initialize}%>のようなものをhtmlで直接記述した方がずっと良いでしょう。 開発ビルド中に、スクリプトはこの行を複数のスクリプトタグ(debug-aに便利)で置き換え、実稼働環境では指定された順序でファイルを1つにマージします。
  2. antを使用してファイルをダウンロードすることは非常に便利ではありませんが、新しいバージョンがリリースされたり、ダウンロードリンクが変更された場合はどうなりますか? そのような場合には、 mavenを使用する方がはるかに便利です。
  3. 補数:)
私のブログのPS Crosspost




All Articles