aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-03-30 13:11:27 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-03-30 13:11:27 +0200
commit42b419d27adbe6f1fc504a7fe42b847d9b9c0335 (patch)
tree352b048226bac1ef19e6d9983ada2fbfc0821caa /build
parent415ee934fa98eeb6773504af8207374dc64f4d5e (diff)
parent9fa157840f0bfacfd4190bd6a159cba8ac2107b8 (diff)
downloadjquery-ui-42b419d27adbe6f1fc504a7fe42b847d9b9c0335.tar.gz
jquery-ui-42b419d27adbe6f1fc504a7fe42b847d9b9c0335.zip
Merge branch 'master' into checksums
Diffstat (limited to 'build')
-rw-r--r--build/build.xml75
1 files changed, 49 insertions, 26 deletions
diff --git a/build/build.xml b/build/build.xml
index 913d13693..826ea0c9e 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -28,18 +28,19 @@
<property name="theme.dir" value="${ui.dir}/themes/base/" />
<property name="docs.dir" value="${ui.dir}/docs/" />
- <property name="min.folder" value="${dist.dir}/ui/minified" />
+ <property name="min.dir" value="${dist.dir}/ui/minified" />
<property name="concatenated" value="jquery-ui" />
<property name="concatenated.i18n" value="jquery-ui-i18n" />
<property name="core.files" value="jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js" />
+ <property name="core.files.min" value="jquery.ui.core.min.js, jquery.ui.widget.min.js, jquery.ui.mouse.min.js, jquery.ui.draggable.min.js, jquery.ui.droppable.min.js, jquery.ui.resizable.min.js, jquery.ui.selectable.min.js, jquery.ui.sortable.min.js, jquery.effects.core.min.js" />
<property description="Google Closure" name="closure-jar" value="${build.dir}/google-compiler-20091218.jar" />
- <target name="deploy-release" depends="docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder">
+ <target name="deploy-release" depends="clean, docs-download, concatenate, minify, copy, replace-version, prepend-header, zip" description="Release builder">
</target>
-
+
<target name="replace-version">
<replaceregexp match="@VERSION" replace="${release.version}" flags="g" byline="true">
<fileset dir="${dist.dir}/ui/" includes="*.js"/>
@@ -49,7 +50,6 @@
</target>
<target name="prepend-header">
- <!-- TODO: refactor this ugly mess -->
<copy todir="${dist.dir}/headers/">
<fileset dir="${dist.dir}/ui/" includes="*.js" />
</copy>
@@ -57,7 +57,7 @@
<fileset dir="${dist.dir}/headers/" includes="*.js"/>
</replaceregexp>
<for param="file">
- <path><fileset dir="${dist.dir}/ui/minified/" includes="*.js" /></path>
+ <path><fileset dir="${min.dir}/" includes="*.js" /></path>
<sequential>
<propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
<concat destfile="${dist.dir}/ui-headered/${target}.min.js">
@@ -66,9 +66,33 @@
</concat>
</sequential>
</for>
- <copy todir="${dist.dir}/ui/minified">
+ <copy todir="${min.dir}">
<fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
</copy>
+
+ <!-- once more for the i18n files -->
+ <!-- need to clean up headers in those files first
+ <copy todir="${dist.dir}/headers/i18n/">
+ <fileset dir="${dist.dir}/ui/i18n/" includes="*.js" />
+ </copy>
+ <replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
+ <fileset dir="${dist.dir}/headers/i18n/" includes="*.js"/>
+ </replaceregexp>
+ <for param="file">
+ <path><fileset dir="${min.dir}/i18n/" includes="*.js" /></path>
+ <sequential>
+ <propertyregex override="yes" property="target" input="@{file}" regexp=".*[\\/](.+)\.min\.js$" replace="\1"/>
+ <concat destfile="${dist.dir}/ui-headered/i18n/${target}.min.js">
+ <header file="${dist.dir}/headers/i18n/${target}.js" />
+ <fileset file="@{file}" />
+ </concat>
+ </sequential>
+ </for>
+ <copy todir="${min.dir}/i18n/">
+ <fileset dir="${dist.dir}/ui-headered/i18n/" includes="*.js" />
+ </copy>
+ -->
+
<delete dir="${dist.dir}/headers/" />
<delete dir="${dist.dir}/ui-headered/" />
</target>
@@ -108,45 +132,44 @@
<target name="minify" depends="concatenate" description="Remove all comments and whitespace, no compression, great in combination with GZip">
<echo message="Building minified" />
- <delete dir="${min.folder}/" />
- <mkdir dir="${min.folder}" />
- <delete dir="${min.folder}/i18n/" />
- <mkdir dir="${min.folder}/i18n/" />
+ <delete dir="${min.dir}/" />
+ <mkdir dir="${min.dir}" />
+ <delete dir="${min.dir}/i18n/" />
+ <mkdir dir="${min.dir}/i18n/" />
<apply executable="java" parallel="false">
<fileset dir="${src.dir}/" includes="jquery.ui.*.js, jquery.effects.*.js" />
<arg line="-jar" />
- <arg path="build/google-compiler-20091218.jar" />
+ <arg path="${closure-jar}" />
<arg value="--warning_level" />
<arg value="QUIET" />
<arg value="--js_output_file" />
<targetfile />
<arg value="--js" />
- <mapper type="glob" from="*.js" to="${min.folder}/*.min.js" />
+ <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
</apply>
+
+ <concat destfile="${min.dir}/${concatenated}.min.js">
+ <filelist dir="${min.dir}" files="${core.files.min}" />
+ <fileset dir="${min.dir}" includes="jquery.ui.*.js, jquery.effects.*.js" excludes="${core.files.min}" />
+ </concat>
- <apply executable="java" parallel="false" verbose="true" dest="${dist.dir}">
- <filelist dir="${dist.dir}/ui/" files="${concatenated}.js" />
+ <apply executable="java" parallel="false">
+ <fileset dir="${src.dir}/i18n/" includes="jquery.ui.*.js" />
<arg line="-jar" />
- <arg path="build/google-compiler-20091218.jar" />
+ <arg path="${closure-jar}" />
<arg value="--warning_level" />
<arg value="QUIET" />
<arg value="--js_output_file" />
<targetfile />
<arg value="--js" />
- <mapper type="glob" from="${concatenated}.js" to="tmpmin" />
+ <mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" />
</apply>
- <concat destfile="${min.folder}/jquery-ui.min.js">
- <filelist files="${src.dir}/jquery.ui.core.js, ${dist.dir}/tmpmin"/>
- <filterchain>
- <headfilter lines="9"/>
- </filterchain>
- </concat>
- <concat destfile="${min.folder}/jquery-ui.min.js" append="yes">
- <filelist files="${dist.dir}/tmpmin"/>
+
+ <concat destfile="${min.dir}/i18n/${concatenated.i18n}.min.js">
+ <fileset dir="${min.dir}/i18n" includes="jquery.ui.*.js" />
</concat>
- <delete file="${dist.dir}/tmpmin"/>
-
+
<echo message="Minified ui/ built." />
</target>