Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (78 sloc) 3.5 KB
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="Hasher" default="all" basedir="./">
Hasher Build Task. Unify files, compress, validate, generate documentation and distribution files.
<!-- properties -->
<property file="dev/build/"/>
<!-- targets -->
<target name="purge" description="Delete destination directories.">
<delete dir="${deploy.dir}" />
<target name="-mkdirs" description="Make required dirs.">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${docs.dir}"/>
<target name="-purgeDocs">
<delete dir="${docs.dir}" />
<target name="-purgeJS">
<delete dir="${dist.dir}" />
<target name="concat" depends="-purgeJS, -mkdirs" description="Concatenate Files and outputs uncompressed version of Hasher.">
<echo message="Building ${}" />
<format property="" pattern="yyyy/MM/dd hh:mm aa" unit="hour"/>
<loadfile property="hasher.js" srcFile="${src.dir}/hasher.js"/>
<loadfile property="license.txt" srcFile="${src.dir}/license.txt"/>
<copy file="${src.dir}/wrapper.js" tofile="${dist.dir}/${}" />
<fileset dir="${dist.dir}" includes="${}" />
<replacefilter token="//::LICENSE:://" value="${license.txt}" />
<replacefilter token="//::HASHER:://" value="${hasher.js}" />
<!-- version number, build number/date should come after other replaces -->
<replacefilter token="::VERSION_NUMBER::" value="${version.number}"/>
<replacefilter token="::BUILD_DATE::" value="${}"/>
<replacefilter token="::BUILD_NUMBER::" value="${build.number}" />
<echo message="${} built" />
<target name="minify" description="Build minified version of Hasher.">
<echo message="Building ${}" />
<apply executable="java" parallel="false" verbose="true" dest="${dist.dir}">
<fileset dir="${dist.dir}">
<include name="*.js" />
<arg line="-jar" />
<arg path="${yuicompressor.jar}" />
<arg value="--charset" />
<arg value="ANSI" />
<arg value="-o" />
<targetfile />
<mapper type="glob" from="*.js" to="*.min.js" />
<echo message="${} built." />
<target name="generateDocs" depends="-purgeDocs" description="Build Hasher and generates documentation.">
<echo message="Generating documentation" />
<apply executable="java" parallel="false" verbose="true">
<fileset dir="${dist.dir}">
<include name="${}" />
<arg line="-jar" />
<arg path="${jsdoc-toolkit.dir}/jsrun.jar" />
<arg value="${jsdoc-toolkit.dir}/app/run.js" />
<arg value="-t=${jsdoc-toolkit.dir}/templates/hasher" />
<arg value="-d=${docs.dir}" />
<echo message="Documentation generated" />
<target name="compile" depends="concat, minify">
<echo message="Compiled." />
<target name="deploy" depends="purge, -mkdirs, compile, generateDocs">
<echo message="Build Complete." />
Jump to Line
Something went wrong with that request. Please try again.