Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 96 lines (78 sloc) 3.585 kb
76e94d9 @millermedeiros improved build task.
authored
1 <?xml version="1.0" encoding="iso-8859-1"?>
ed07b76 @millermedeiros improved structure/minification, added closure to millermedeiros and …
authored
2 <project name="Hasher" default="all" basedir="./">
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
3 <description>
4 Hasher Build Task. Unify files, compress, validate, generate documentation and distribution files.
5 </description>
6
7 <!-- properties -->
8
52b6c81 @millermedeiros refactored Hasher to don't depend on location.hash to work properly, …
authored
9 <property file="dev/build/build.properties"/>
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
10
11 <!-- targets -->
12
13 <target name="purge" description="Delete destination directories.">
14 <delete dir="${deploy.dir}" />
15 </target>
16
17 <target name="-mkdirs" description="Make required dirs.">
18 <mkdir dir="${deploy.dir}"/>
19 <mkdir dir="${dist.dir}"/>
20 <mkdir dir="${docs.dir}"/>
c66f321 @millermedeiros small improvements on EventDispatcher and queryUtils and added ANT bu…
authored
21 </target>
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
22
23 <target name="-purgeDocs">
24 <delete dir="${docs.dir}" />
25 </target>
26
27 <target name="-purgeJS">
28 <delete dir="${dist.dir}" />
29 </target>
30
31 <target name="concat" depends="-purgeJS, -mkdirs" description="Concatenate Files and outputs uncompressed version of Hasher.">
32 <echo message="Building ${dist.name}" />
33 <tstamp>
34 <format property="build.date" pattern="yyyy/MM/dd hh:mm aa" unit="hour"/>
35 </tstamp>
d6036f6 @millermedeiros changed source structure, removed plugins, improved README and build
authored
36
37 <loadfile property="hasher.js" srcFile="${src.dir}/hasher.js"/>
38 <loadfile property="license.txt" srcFile="${src.dir}/license.txt"/>
39
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
40 <copy file="${src.dir}/wrapper.js" tofile="${dist.dir}/${dist.name}" />
d6036f6 @millermedeiros changed source structure, removed plugins, improved README and build
authored
41
42 <replace>
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
43 <fileset dir="${dist.dir}" includes="${dist.name}" />
d6036f6 @millermedeiros changed source structure, removed plugins, improved README and build
authored
44 <replacefilter token="//::LICENSE:://" value="${license.txt}" />
45 <replacefilter token="//::HASHER:://" value="${hasher.js}" />
46 <!-- version number, build number/date should come after other replaces -->
47 <replacefilter token="::VERSION_NUMBER::" value="${version.number}"/>
48 <replacefilter token="::BUILD_DATE::" value="${build.date}"/>
49 <replacefilter token="::BUILD_NUMBER::" value="${build.number}" />
50 </replace>
51
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
52 <echo message="${dist.name} built" />
53 </target>
54
55 <target name="minify" description="Build minified version of Hasher.">
56 <echo message="Building ${dist.min.name}" />
57 <apply executable="java" parallel="false" verbose="true" dest="${dist.dir}">
58 <fileset dir="${dist.dir}">
59 <include name="*.js" />
60 </fileset>
61 <arg line="-jar" />
62 <arg path="${yuicompressor.jar}" />
63 <arg value="--charset" />
64 <arg value="ANSI" />
65 <arg value="-o" />
66 <targetfile />
67 <mapper type="glob" from="*.js" to="*.min.js" />
68 </apply>
69 <echo message="${dist.min.name} built." />
70 </target>
71
72 <target name="generateDocs" depends="-purgeDocs" description="Build Hasher and generates documentation.">
73 <echo message="Generating documentation" />
74 <apply executable="java" parallel="false" verbose="true">
75 <fileset dir="${dist.dir}">
76 <include name="${dist.name}" />
77 </fileset>
78 <arg line="-jar" />
79 <arg path="${jsdoc-toolkit.dir}/jsrun.jar" />
80 <arg value="${jsdoc-toolkit.dir}/app/run.js" />
81 <arg value="-t=${jsdoc-toolkit.dir}/templates/hasher" />
82 <arg value="-d=${docs.dir}" />
83 </apply>
84 <echo message="Documentation generated" />
85 </target>
86
87 <target name="compile" depends="concat, minify">
88 <echo message="Compiled." />
89 </target>
90
4443e9f @millermedeiros add support to hasher.replaceHash(). see #35
authored
91 <target name="deploy" depends="purge, -mkdirs, compile, generateDocs">
fe7489a @millermedeiros changed wrapper, so now we only have a single dist file to all envs. …
authored
92 <echo message="Build Complete." />
93 </target>
94
d6036f6 @millermedeiros changed source structure, removed plugins, improved README and build
authored
95 </project>
Something went wrong with that request. Please try again.