Permalink
Browse files

Build: Switching to uglify.js instead of closure compilier. Saves 4 m…

…inutes per build, and actually produces slightly smaller files

(cherry picked from commit bd71f24)

Conflicts:

	build/build.xml
  • Loading branch information...
1 parent ca2ac47 commit eee4db7866fcba3d5bea72be311445cde62b13ca @gnarf gnarf committed Oct 18, 2011
Showing with 8,804 additions and 65 deletions.
  1. +4 −64 build/build.xml
  2. +5,504 −0 build/build/lib/jslint.js
  3. +1,315 −0 build/build/lib/parse-js.js
  4. +1,666 −0 build/build/lib/process.js
  5. +22 −0 build/build/lib/squeeze-more.js
  6. +3 −0 build/build/minify-js.sh
  7. +5 −1 build/build/sizer.js
  8. +285 −0 build/build/uglify.js
View
@@ -39,7 +39,6 @@
<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" />
<property description="YUI Compressor" name="yuicompressor-jar" value="${build.dir}/yuicompressor-2.4.2.jar" />
<target name="deploy-release" depends="clean, docs-download, copy, minify, replace-version, prepend-header, zip" description="Release builder">
@@ -56,26 +55,6 @@
<target name="prepend-header">
<copy todir="${dist.dir}/headers/">
- <fileset dir="${dist.dir}/ui/" includes="*.js" />
- </copy>
- <replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
- <fileset dir="${dist.dir}/headers/" includes="*.js"/>
- </replaceregexp>
- <for param="file">
- <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">
- <header file="${dist.dir}/headers/${target}.js" />
- <fileset file="@{file}" />
- </concat>
- </sequential>
- </for>
- <copy todir="${min.dir}" overwrite="true">
- <fileset dir="${dist.dir}/ui-headered/" includes="*.js" />
- </copy>
-
- <copy todir="${dist.dir}/headers/">
<fileset dir="${dist.dir}/themes/base" includes="*.css" />
</copy>
<replaceregexp match="^(\/\*.*?\*\/\s).+" replace="\1" flags="s">
@@ -95,29 +74,6 @@
<fileset dir="${dist.dir}/ui-headered/" includes="*.css" />
</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>
@@ -161,27 +117,11 @@
<mkdir dir="${min.dir}/i18n/" />
<mkdir dir="${dist.dir}/themes/base/minified" />
<parallel threadsperprocessor="1">
- <apply executable="java" parallel="false">
- <fileset dir="${dist.dir}/ui" includes="*.js" />
- <arg line="-jar" />
- <arg path="${closure-jar}" />
- <arg value="--warning_level" />
- <arg value="QUIET" />
- <arg value="--js_output_file" />
- <targetfile />
- <arg value="--js" />
+ <apply executable="build/minify-js.sh">
+ <fileset dir="${dist.dir}/ui" includes="**.js" />
+ <srcfile />
<mapper type="glob" from="*.js" to="${min.dir}/*.min.js" />
- </apply>
- <apply executable="java" parallel="false">
- <fileset dir="${dist.dir}/ui/i18n" includes="*.js" />
- <arg line="-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.dir}/i18n/*.min.js" />
+ <targetfile/>
</apply>
<apply executable="java" parallel="false">
<fileset dir="${dist.dir}/themes/base" includes="*.css" />
Oops, something went wrong.

0 comments on commit eee4db7

Please sign in to comment.