Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (66 sloc) 2.81 KB
<project name="Dominoes" default="dominoes" basedir=".">
<tstamp>
<format property="date" pattern="M/d/y HH:mm:ss.SSS - z" locale="en,US"/>
</tstamp>
<loadfile property="version" srcfile="version.txt" />
<property description="Folder for dominoes and min target" name="dist" value="./dist" />
<property name="DOM" value="${dist}/dominoes.js" />
<property name="DOM_MIN" value="${dist}/dominoes.min.js" />
<available property="qunit" file="test/qunit" />
<target name="qunit-clone" unless="qunit">
<exec executable="git" outputproperty="git-qunit" >
<arg line="clone git://github.com/jquery/qunit.git test/qunit"/>
</exec>
<echo message="git clone qunit: ${git-qunit}" />
</target>
<target name="qunit-pull" if="qunit">
<exec executable="git" outputproperty="git-qunit" dir="test/qunit" >
<arg line="pull origin master"/>
</exec>
<echo message="git pull qunit: ${git-qunit}" />
</target>
<target name="dominoes" depends="qunit-clone,qunit-pull" description="Main dominoes build, concatenates source files and replaces @VERSION">
<echo message="Building: ${DOM}" />
<mkdir dir="${dist}" />
<concat destfile="${DOM}">
<fileset file="src/_intro.js" />
<fileset file="src/main.js" />
<fileset file="src/utils.js" />
<fileset file="src/poll.js" />
<fileset file="src/ready.js" />
<fileset file="src/dataHolder.js" />
<fileset file="src/property.js" />
<fileset file="src/functor.js" />
<fileset file="src/rule.js" />
<fileset file="src/execute.js" />
<fileset file="src/parse.js" />
<fileset file="src/loaders/generic.js" />
<fileset file="src/loaders/accumulator.js" />
<fileset file="src/loaders/script.js" />
<fileset file="src/loaders/stylesheet.js" />
<fileset file="src/_outro.js" />
</concat>
<replaceregexp match="@VERSION" replace="${version}" file="${DOM}" />
<replaceregexp match="@DATE" replace="${date}" flags="g" byline="true" file="${DOM}" />
<echo message="Building: ${DOM_MIN}" />
<apply executable="java" parallel="false" verbose="true">
<fileset dir="${dist}">
<include name="dominoes.js" />
</fileset>
<arg line="-jar" />
<arg path="build/google-compiler-20091218.jar" />
<arg value="--warning_level" />
<arg value="QUIET" />
<arg value="--js_output_file" />
<arg value="${DOM_MIN}" />
<arg value="--js" />
</apply>
<replaceregexp match=" @license" replace="" file="${DOM}" />
<gzip src="${DOM_MIN}" destfile="${DOM_MIN}.gz"/>
</target>
<target name="all" depends="dominoes" />
<target name="clean">
<delete dir="${dist}" />
<delete dir="test/qunit" />
</target>
</project>