Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improves the build procedure.

  • Loading branch information...
commit b493504ed5e7e405ac5b5ea1b3c305954a8d2c2a 1 parent aa34531
@asual asual authored
Showing with 31 additions and 41 deletions.
  1. +0 −4 build.properties
  2. +31 −37 build.xml
View
4 build.properties
@@ -4,10 +4,6 @@ samples.dir=samples
src.dir=src
test.dir=test
-api.sample.dir=${samples.dir}/api
-events.sample.dir=${samples.dir}/events
-tabs.sample.dir=${samples.dir}/tabs
-
name=jquery.address
optimizer=jquery.address-optimizer
version=1.2
View
68 build.xml
@@ -65,12 +65,12 @@
<target name="validate">
<java classpath="lib/js.jar"
- classname="org.mozilla.javascript.tools.shell.Main"
+ 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)" />
@@ -91,55 +91,49 @@
<arg line="--js=${file} --js_output_file=${file}.tmp" />
</java>
<concat destfile="${file}.lic">
- <filelist files="${file}" />
- <filterchain>
- <headfilter lines="10" />
- </filterchain>
- </concat>
+ <filelist files="${file}" />
+ <filterchain>
+ <headfilter lines="10" />
+ </filterchain>
+ </concat>
<concat destfile="${file}">
<filelist files="${file}.lic,${file}.tmp" />
</concat>
- <delete>
- <filelist files="${file}.lic,${file}.tmp" />
- </delete>
- </target>
-
- <target name="test">
<delete>
- <fileset dir="${test.dir}" includes="${name}-\d.\d+.min.js" />
+ <filelist files="${file}.lic,${file}.tmp" />
</delete>
- <copy file="${dist.dir}/${name}-${version}.min.js" todir="${test.dir}" overwrite="true" />
- </target>
-
- <target name="samples">
- <antcall target="samples:api" />
- <antcall target="samples:events" />
- <antcall target="samples:tabs" />
</target>
- <target name="samples:api">
- <echo message="Building API sample..." />
+ <target name="sample">
<delete>
- <fileset dir="${api.sample.dir}" includes="${name}-\d.\d+.min.js" />
+ <fileset dir="${dir}" includes="${name}-\d.\d+.min.js" />
</delete>
- <copy file="${dist.dir}/${name}-${version}.min.js" todir="${api.sample.dir}" overwrite="true" />
+ <copy file="${dist.dir}/${name}-${version}.min.js" todir="${dir}" overwrite="true" />
</target>
-
- <target name="samples:events">
- <echo message="Building Events sample..." />
+
+ <target name="test">
<delete>
- <fileset dir="${events.sample.dir}" includes="${name}-\d.\d+.min.js" />
+ <fileset dir="${test.dir}" includes="${name}-\d.\d+.min.js" />
</delete>
- <copy file="${dist.dir}/${name}-${version}.min.js" todir="${events.sample.dir}" overwrite="true" />
+ <copy file="${dist.dir}/${name}-${version}.min.js" todir="${test.dir}" overwrite="true" />
</target>
- <target name="samples:tabs">
- <echo message="Building Tabs sample..." />
- <delete>
- <fileset dir="${tabs.sample.dir}" includes="${name}-\d.\d+.min.js" />
- <fileset dir="${tabs.sample.dir}" includes="${optimizer}-\d.\d+.min.js" />
- </delete>
- <copy file="${dist.dir}/${name}-${version}.min.js" todir="${tabs.sample.dir}" overwrite="true" />
+ <target name="samples">
+ <antcall target="sample">
+ <param name="dir" value="${samples.dir}/accordion" />
+ </antcall>
+ <antcall target="sample">
+ <param name="dir" value="${samples.dir}/api" />
+ </antcall>
+ <antcall target="sample">
+ <param name="dir" value="${samples.dir}/crawling" />
+ </antcall>
+ <antcall target="sample">
+ <param name="dir" value="${samples.dir}/events" />
+ </antcall>
+ <antcall target="sample">
+ <param name="dir" value="${samples.dir}/tabs" />
+ </antcall>
</target>
</project>
Please sign in to comment.
Something went wrong with that request. Please try again.