html2canvas/build.xml

76 lines
3.0 KiB
XML
Raw Normal View History

2011-07-16 20:59:15 +04:00
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="html2canvas" basedir="." default="build">
2011-07-16 20:59:15 +04:00
<property name="src.dir" location="src"/>
2011-09-12 22:35:37 +04:00
<property name="lib.dir" location="../lib"/>
2011-07-16 20:59:15 +04:00
<property name="build.dir" location="build"/>
<property name="dist" location="dist"/>
<property name="jquery-externs" value="jquery-1.4.4.externs.js"/>
2011-07-16 20:59:15 +04:00
<property name="JS_NAME" value="html2canvas.js"/>
<property name="JS_NAME_MIN" value="html2canvas.min.js"/>
<property name="JQUERY_PLUGIN_NAME" value="jquery.plugin.html2canvas.js"/>
<loadfile property="version" srcfile="version.txt" />
2011-07-16 20:59:15 +04:00
<fileset id="sourcefiles" dir="${src.dir}">
<include name="LICENSE"/>
<include name="Core.js"/>
<include name="Generate.js"/>
<include name="Parse.js"/>
<include name="Preload.js"/>
<include name="Queue.js"/>
<include name="Renderer.js"/>
</fileset>
2011-09-12 22:35:37 +04:00
2011-07-16 20:59:15 +04:00
<path id="jquery-plugin">
<fileset dir="${src.dir}" includes="LICENSE"/>
<fileset dir="${src.dir}/plugins" includes="${JQUERY_PLUGIN_NAME}"/>
</path>
2011-07-16 20:59:15 +04:00
<target name="plugins">
<concat fixlastline="yes" destfile="${build.dir}/${JQUERY_PLUGIN_NAME}">
<path refid="jquery-plugin"/>
</concat>
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JQUERY_PLUGIN_NAME}" />
2011-07-16 20:59:15 +04:00
</target>
<target name="build" depends="plugins">
2011-07-16 20:59:15 +04:00
<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
<fileset refid="sourcefiles"/>
2011-07-16 20:59:15 +04:00
</concat>
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME}" />
2011-07-16 20:59:15 +04:00
</target>
2011-07-16 20:59:15 +04:00
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
classpath="${lib.dir}/compiler.jar" onerror="report"/>
<target name="release" depends="build">
<jscomp compilationLevel="simple" warning="verbose"
debug="false"
output="${build.dir}/${JS_NAME_MIN}">
2011-07-16 20:59:15 +04:00
<externs dir="${lib.dir}">
<file name="${jquery-externs}"/>
2011-07-16 20:59:15 +04:00
</externs>
<sources dir="${src.dir}">
<!-- need to write them again here since the closure compiler doesn't understand filesets,... -->
<file name="LICENSE"/>
<file name="Core.js"/>
<file name="Generate.js"/>
<file name="Parse.js"/>
<file name="Preload.js"/>
<file name="Queue.js"/>
<file name="Renderer.js"/>
2011-07-16 20:59:15 +04:00
</sources>
</jscomp>
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME_MIN}" />
</target>
2011-07-16 20:59:15 +04:00
<target name="clean">
<delete file="${build.dir}/${JS_NAME}"></delete>
<delete file="${build.dir}/${JS_NAME_MIN}"></delete>
<delete file="${build.dir}/${JQUERY_PLUGIN_NAME}"></delete>
2011-07-16 20:59:15 +04:00
</target>
</project>