Skip to content

Commit

Permalink
Optimizes the header
Browse files Browse the repository at this point in the history
  • Loading branch information
asual committed Jan 27, 2013
1 parent 436af93 commit 60007ac
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 310 deletions.
59 changes: 20 additions & 39 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,54 +41,35 @@
<copy todir="${dist.dir}">
<fileset dir="${src.dir}"/>
</copy>
<antcall target="process">
<param name="file" value="${dist.dir}/${name}" />
</antcall>
<antcall target="compress">
<param name="file" value="${dist.dir}/${name}-${version}.min.js" />
</antcall>
</target>

<target name="validate">
<java classpath="lib/js.jar"
classname="org.mozilla.javascript.tools.shell.Main"
failonerror="true" fork="true">
<arg line="${lib.dir}/rhino.js ${file}.js" />
</java>
</target>

<target name="process">
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss Z (EEE, dd MMM yyyy)" />
</tstamp>
<replaceregexp match="\$\{version\}" file="${file}.js">
<replaceregexp match="\$\{version\}" file="${dist.dir}/${name}.js">
<substitution expression="${version}"/>
</replaceregexp>
<replaceregexp match="\$\{timestamp\}" file="${file}.js">
<substitution expression="${timestamp}"/>
</replaceregexp>
<copy file="${file}.js" tofile="${file}-${version}.min.js" />
<move file="${file}.js" tofile="${file}-${version}.js" />
</target>

<target name="compress">
<java jar="${lib.dir}/compiler.jar"
failonerror="true" fork="true">
<arg line="--js=${file} --js_output_file=${file}.tmp" />
</java>
<concat destfile="${file}.lic">
<filelist files="${file}" />
<move file="${dist.dir}/${name}.js" tofile="${dist.dir}/${name}-${version}.js" />
<concat destfile="${dist.dir}/${name}-${version}.lic">
<filelist files="${dist.dir}/${name}-${version}.js" />
<filterchain>
<headfilter lines="10" />
<headfilter lines="1" />
</filterchain>
</concat>
<concat destfile="${file}">
<filelist files="${file}.lic,${file}.tmp" />
<java jar="${lib.dir}/compiler.jar"
failonerror="true" fork="true">
<arg line="--js=${dist.dir}/${name}-${version}.js --js_output_file=${dist.dir}/${name}-${version}.tmp" />
</java>
<concat destfile="${dist.dir}/${name}-${version}.min.js">
<filelist files="${dist.dir}/${name}-${version}.lic,${dist.dir}/${name}-${version}.tmp" />
</concat>
<delete>
<filelist files="${file}.lic,${file}.tmp" />
<filelist files="${dist.dir}/${name}-${version}.lic,${dist.dir}/${name}-${version}.tmp" />
</delete>
</target>

<target name="validate">
<java classpath="lib/js.jar"
classname="org.mozilla.javascript.tools.shell.Main"
failonerror="true" fork="true">
<arg line="${lib.dir}/rhino.js ${file}.js" />
</java>
</target>

<target name="sample">
<delete>
Expand Down
49 changes: 20 additions & 29 deletions samples/accordion/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/api/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/events/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/express/public/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/form/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/state/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/subtabs/jquery.address-1.6.min.js

Large diffs are not rendered by default.

49 changes: 20 additions & 29 deletions samples/tabs/jquery.address-1.6.min.js

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions src/jquery.address.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
/*
* jQuery Address Plugin v${version}
* http://www.asual.com/jquery/address/
*
* Copyright (c) 2009-2013 Rostislav Hristov
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Date: ${timestamp}
*/
/*! jQuery Address v${version} | (c) 2009, 2013 Rostislav Hristov | jquery.org/license */
(function ($) {

$.address = (function () {
Expand Down
49 changes: 20 additions & 29 deletions test/jquery.address-1.6.min.js

Large diffs are not rendered by default.

0 comments on commit 60007ac

Please sign in to comment.