背景
ご存知のように、サイトを公開する前に開発を行っています。 そして、奇妙なことに、開発者のマシンでこれを行います。 また、開発中にjavascript(場合によってはcss)を複数のファイルに保存する方が便利であることが長い間指摘されています。問題は、記事「Webサイトの 高速化の ベストプラクティス 」に記載されている原則に従って、サイトの読み込みを高速化するには、javascriptファイルとcssファイルで次の操作を実行する必要があります。- すべてのjavascriptを1つのファイルにマージします。望ましい順序(jQueryライブラリなど)が先頭に近づき、それを使用する関数とオブジェクトがその後になるようにすることが望ましいです。
- すべてのcssを1つのファイルにマージします
- yui-compressorなどのユーティリティを使用して、これらの大きなファイルを圧縮します(名前が、たとえば、data:URLを含むie_プレフィックスで始まるcssファイルを除く。したがって、行から行への遷移に不可欠です。あなた自身の安心のためにそれらを圧縮しない方が良いです)
- この順序で並べます-cssファイルは開始タグの先頭にできるだけ近く、jsファイルは終了タグの本体にできるだけ近くにあります。
- ユーザーのブラウザがそれらをキャッシュするように、expires HTTPヘッダーをより長く設定します。 ユーザーが次のビルドでjsとcssを更新するには、これらのファイルに一意の名前を付ける必要があります。
- クライアントにファイルを送信する前に、gzipを使用してそれらを圧縮します
なんで?
ポイント5と6は他の 場所ですでに詳細です。この記事では、アイテム1、2、3、4の自動化の問題を検討します。 より正確には、ボタンをクリックするだけでこのリストのステップ1、2、3、4を実行し、javascriptおよびcssファイルをサーバーにアップロードする準備ができるツール(最大2つまたは3つ)を提供したいと思います。
ツールキット
- コレクターとしてのApache Ant 。 チームシティによると、速度、可用性、クロスプラットフォーム、および結果のスクリプトを、ある種のCIツールを実行する本番用のプロジェクトをレイアウトするためのより一般的なスクリプトに簡単に含めることができるという考慮事項についての選択が彼にかかった 。
- jsおよびcssファイルを圧縮するためのユーティリティとしてのYUI Compressor 。 クロスプラットフォーム、適切性、高速性のために撮影
- JavaScriptバリデーターとしてのJSLint4Java (javaのJSLintポート)。 実稼働環境では機能しないコードをレイアウトしたくないのですか? ちなみに、フレーズはオフに書かれています。 サイト、「JSLintはあなたの感情を傷つけるかもしれない」は非常に公平です:)
スクリプト操作アルゴリズム
- JSLint4JavaおよびYUI Compressorをダウンロードして解凍し、プロジェクト内のtoolsフォルダーに配置します。 もちろん、$ TOOLS_LOCATIONのようなシステム変数で定義された場所のどこかに置く方がより正確ですが、デモスクリプトでも実行できます。必要に応じてスクリプトを自分で修正できます。
- すべてのjsファイルにJSLint4Javaを設定します。 JSLintがエラーを見つけた場合は、画面にエラーを表示してスクリプトを停止します。
- 他の場所で定義するファイルの順序を保持しながら、フレーズテストの名前のファイルを除くすべてのjsファイルを一意の名前を持つ1つのファイルにマージします。 一意の名前として、main.hh.dd.MM.yy.jsという構造を取りましょう。ここで、hh、dd、MM、yyは、それぞれ現在の時間、日、月、年です。
- ie_で始まる名前を除くすべてのcssファイルを一意の名前を持つ1つのファイルにマージします(名前は前の段落と同じで、拡張子のみが `css`に変更されます)。 この場合の順序は重要ではありません。
- 結果のYUI Compressorファイルを設定します。 圧縮中にエラーが発生した場合は、エラーを表示してスクリプトを停止します。
- すべてのスタイルファイルを含むhtmlテンプレートで、ie_ファイルを含むsrcおよびスタイルルールを含むsrcを除くすべてのリンクタグを削除し、src属性を使用して外部cssファイルを接続しません。
- 同じテンプレートで、javascriptコードを含む(src属性を介して外部スクリプトファイルを含まない)スクリプトタグを除くすべてのスクリプトタグを削除します。
- 同じテンプレートで、結果のcssファイルを開始headタグのできるだけ近くに規定します。
- 同じテンプレートで、終了タグの本体にできるだけ近い結果のjsファイルまたは開始タグスクリプトの結果のjsファイルを指定します...この奇妙な動作は、このために必要です。 htmlファイルでは、いくつかのデータを使用してサーバー側コードでjsオブジェクトを直接初期化します。 そのためには、スクリプトタグを保存し、結果のjsファイルを添付する必要があります。
- 結果のjs、css、htmlファイルをディレクトリに展開します。
実装例
念のため、例: ant1<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < project name ="production-build" default ="build" basedir ="." > <!-- , yui-compressor jslint4java --> < property name ="tools.location" value ="tools/" /> <!-- yui compressor' , , jar- --> < property name ="yuicompressor-version" value ="2.4" /> < property name ="yuicompressor-zip" value ="yuicompressor-${yuicompressor-version}.zip" /> < property name ="yuicompressor-unzip-dir" value ="yuicompressor-${yuicompressor-version}" /> < property name ="yuicompressor-location" value ="http://www.julienlecomte.net/yuicompressor/" /> < property name ="yuicompressor-jar" value ="yuicompressor-${yuicompressor-version}.jar" /> <!-- jslint4java , , jar- --> < property name ="jslint-version" value ="1.2.1" /> < property name ="jslint-location" value ="http://jslint4java.googlecode.com/files/" /> < property name ="jslint-zip" value ="jslint4java-${jslint-version}.zip" /> < property name ="jslint-jar" value ="jslint4java-${jslint-version}+rhino.jar" /> < property name ="jslint-unzip-dir" value ="jslint4java-${jslint-version}" /> <!-- js-, css-, html- --> < property environment ="env" /> < property name ="js.src" value ="js/" /> < property name ="css.src" value ="css/" /> < property name ="template.name" value ="index.html" /> < property name ="template" value ="${template.name}" /> <!-- --> < property name ="output.dir" value ="build/" /> < property name ="js.out" value ="${output.dir}/js/" /> < property name ="css.out" value ="${output.dir}/css/" /> < property name ="template.out" value ="${output.dir}/${template.name}" /> <!-- js-. js- --> <!-- --> < property name ="js-required-file-order" value ="jquery-1.2.6.js, some_object.js" /> <!-- --> < target name ="init" > < tstamp > <!-- mm-hh-MM-dd-yyyy --> < format property ="build-time" pattern ="mm-hh-MM-dd-yyyy" /> </ tstamp > <!-- , yui compressor jslint4java --> < mkdir dir ="${tools.location}" /> </ target > < target name ="prepare-tools" depends ="init" > <!-- jslint yui compressor --> < antcall target ="prepare-yuicompressor" /> < antcall target ="prepare-jslint" /> </ target > <!-- jslint --> < target name ="prepare-jslint" depends ="check-if-jslint-exists" unless ="jslint.exist" > < get src ="${jslint-location}${jslint-zip}" dest ="${tools.location}${jslint-zip}" verbose ="true" /> < unzip src ="${tools.location}${jslint-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${jslint-unzip-dir}/${jslint-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${jslint-unzip-dir}" /> < delete file ="${tools.location}${jslint-zip}" /> </ target > <!-- , jslint - js- --> < target name ="check-if-jslint-exists" > < condition property ="jslint.exist" > < and > < available file ="${tools.location}${jslint-jar}" /> </ and > </ condition > </ target > <!-- jslint --> < target name ="prepare-yuicompressor" depends ="check-if-yuicompressor-exists" unless ="yuicompressor.exist" > < get src ="${yuicompressor-location}${yuicompressor-zip}" dest ="${tools.location}${yuicompressor-zip}" verbose ="true" /> < unzip src ="${tools.location}${yuicompressor-zip}" dest ="${tools.location}" /> < copy file ="${tools.location}${yuicompressor-unzip-dir}/build/${yuicompressor-jar}" todir ="${tools.location}" /> < delete dir ="${tools.location}${yuicompressor-unzip-dir}" /> < delete file ="${tools.location}${yuicompressor-zip}" /> </ target > <!-- , jslint - js/css- --> < target name ="check-if-yuicompressor-exists" > < condition property ="yuicompressor.exist" > < and > < available file ="${tools.location}${yuicompressor-jar}" /> </ and > </ condition > </ target > <!-- javascript --> < target name ="validate-javascript" depends ="prepare-tools" > < apply executable ="java" parallel ="false" failonerror ="false" > < fileset dir ="${js.src}" > < include name ="**/*.js" /> <!-- , --> < exclude name ="**/jquery-1.2.6.js" /> </ fileset > < arg value ="-jar" /> < arg file ="${tools.location}${jslint-jar}" /> < arg value ="--bitwise" /> < arg value ="--browser" /> < arg value ="--undef" /> < arg value ="--widget" /> < srcfile /> </ apply > </ target > <!-- js/css- --> < target name ="compress" depends ="prepare-tools, concatenate-files" > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${js.out}" verbose ="true" force ="true" > < fileset dir ="${js.out}" includes ="*.js" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 8000" /> < arg line ="-o" /> < targetfile /> < srcfile /> < mapper type ="glob" from ="*.js" to ="*.js" /> </ apply > < apply executable ="java" parallel ="false" failonerror ="true" dest ="${css.out}" verbose ="true" force ="true" > < fileset dir ="${css.out}" includes ="*.css" excludes ="ie_*.css" /> < arg line ="-jar" /> < arg path ="${tools.location}${yuicompressor-jar}" /> < arg line ="--line-break 0" /> < srcfile /> < arg line ="-o" /> < mapper type ="glob" from ="*.css" to ="*.css" /> < targetfile /> </ apply > </ target > <!-- css js , --> < target name ="update-tags" depends ="prepare-tools" > < copy file ="${template}" tofile ="${template.out}" overwrite ="true" /> < replaceregexp file ="${template.out}" match ="<script\s+type="text/javascript"\s+src="[A-Za-z0-9._\-/]*"></script>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="(<script*|</body>)" flags ="im" replace ="<script type="text/javascript" src="js/main-${build-time}.js"></script>${line.separator}\1" /> < replaceregexp file ="${template.out}" match ="<link[^>]*href="css/[^i>]{1}[^e>]{1}[^_>]{1}[^>]*/>" flags ="igm" replace ="" /> < replaceregexp file ="${template.out}" match ="</head>" flags ="im" replace ="<link rel="stylesheet" href="css/main-${build-time}.css" type="text/css" /></head>" /> </ target > <!-- --> < target name ="concatenate-files" depends ="update-tags" > < concat destfile ="${js.out}/main-${build-time}.js" fixlastline ="true" > < filelist dir ="${js.src}" files ="${js-required-file-order}" /> < fileset dir ="${js.src}" includes ="**/*.js" excludes ="${js-required-file-order}" /> </ concat > < copy todir ="${css.out}" > < fileset dir ="${css.src}" includes ="**/ie_*.css" /> </ copy > < concat destfile ="${css.out}/main-${build-time}.css" fixlastline ="true" > < fileset dir ="${css.src}" includes ="**/*.css" excludes ="**/ie_*.css" /> </ concat > </ target > <!-- --> < target name ="build" > < mkdir dir ="${output.dir}" /> < antcall target ="validate-javascript" /> < antcall target ="compress" /> </ target > </ project > * This source code was highlighted with Source Code Highlighter .
藤堂
- スクリプト内でjsファイルの連結順序を直接指定するのはあまり美しくありません。 <%javascript:{first:jquery、last:initialize}%>のようなものをhtmlで直接記述した方がずっと良いでしょう。 開発ビルド中に、スクリプトはこの行を複数のスクリプトタグ(debug-aに便利)で置き換え、実稼働環境では指定された順序でファイルを1つにマージします。
- antを使用してファイルをダウンロードすることは非常に便利ではありませんが、新しいバージョンがリリースされたり、ダウンロードリンクが変更された場合はどうなりますか? そのような場合には、 mavenを使用する方がはるかに便利です。
- 補数:)