2012-02-21 10:51:53 +04:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2011-11-16 03:25:02 +04:00
|
|
|
<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-11-16 03:25:02 +04:00
|
|
|
|
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"/>
|
2011-11-16 03:25:02 +04:00
|
|
|
<loadfile property="version" srcfile="version.txt" />
|
2011-07-16 20:59:15 +04:00
|
|
|
|
2012-02-21 10:51:53 +04:00
|
|
|
<path id="sourcefiles">
|
|
|
|
<filelist dir="${src.dir}">
|
|
|
|
<file name="LICENSE"/>
|
|
|
|
<file name="html2canvas-pre.txt"/>
|
|
|
|
<file name="Core.js"/>
|
|
|
|
<file name="Generate.js"/>
|
|
|
|
<file name="Parse.js"/>
|
|
|
|
<file name="Preload.js"/>
|
|
|
|
<file name="Queue.js"/>
|
|
|
|
<file name="Renderer.js"/>
|
|
|
|
<file name="Util.js"/>
|
2012-03-02 22:35:48 +04:00
|
|
|
<file name="renderers/Canvas.js"/>
|
2012-04-17 12:57:25 +04:00
|
|
|
<file name="renderers/SVG.js"/>
|
2012-02-21 10:51:53 +04:00
|
|
|
<file name="html2canvas-post.txt"/>
|
|
|
|
</filelist>
|
|
|
|
</path>
|
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"/>
|
2012-02-21 10:51:53 +04:00
|
|
|
<fileset dir="${src.dir}/plugins" includes="${JQUERY_PLUGIN_NAME}"/>
|
2011-07-16 20:59:15 +04:00
|
|
|
</path>
|
2011-11-16 03:25:02 +04:00
|
|
|
|
2012-02-21 10:51:53 +04:00
|
|
|
<target name="build-dir">
|
|
|
|
<echo>Creating directory ${build.dir}...</echo>
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="plugins" depends="build-dir">
|
|
|
|
<echo>Creating ${JQUERY_PLUGIN_NAME}...</echo>
|
2011-07-16 20:59:15 +04:00
|
|
|
<concat fixlastline="yes" destfile="${build.dir}/${JQUERY_PLUGIN_NAME}">
|
|
|
|
<path refid="jquery-plugin"/>
|
|
|
|
</concat>
|
2011-11-16 03:25:02 +04:00
|
|
|
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JQUERY_PLUGIN_NAME}" />
|
2011-07-16 20:59:15 +04:00
|
|
|
</target>
|
2011-11-16 03:25:02 +04:00
|
|
|
|
2012-02-21 10:51:53 +04:00
|
|
|
<pathconvert property="prettty-sourcefiles" pathsep="${line.separator}" refid="sourcefiles"></pathconvert>
|
2011-11-16 03:25:02 +04:00
|
|
|
|
2012-02-21 10:51:53 +04:00
|
|
|
<target name="build" depends="build-dir,plugins">
|
|
|
|
<echo>Concatenating files:${line.separator}${prettty-sourcefiles}${line.separator}into ${build.dir}/${JS_NAME}...</echo>
|
2011-07-16 20:59:15 +04:00
|
|
|
<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
|
2012-02-21 10:51:53 +04:00
|
|
|
<path refid="sourcefiles"/>
|
2011-07-16 20:59:15 +04:00
|
|
|
</concat>
|
2011-11-16 03:25:02 +04:00
|
|
|
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME}" />
|
2011-07-16 20:59:15 +04:00
|
|
|
</target>
|
2011-11-16 03:25:02 +04:00
|
|
|
|
2011-07-16 20:59:15 +04:00
|
|
|
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
|
2011-11-16 03:25:02 +04:00
|
|
|
classpath="${lib.dir}/compiler.jar" onerror="report"/>
|
|
|
|
|
2012-02-21 10:51:53 +04:00
|
|
|
<target name="syntaxcheck" depends="build-dir,build">
|
2011-11-16 03:25:02 +04:00
|
|
|
<jscomp compilationLevel="simple" warning="verbose"
|
|
|
|
debug="false"
|
2012-02-21 10:51:53 +04:00
|
|
|
output="${build.dir}/${JS_NAME_MIN}.tmp">
|
2011-07-16 20:59:15 +04:00
|
|
|
<externs dir="${lib.dir}">
|
2011-11-16 03:25:02 +04:00
|
|
|
<file name="${jquery-externs}"/>
|
2011-07-16 20:59:15 +04:00
|
|
|
</externs>
|
2011-11-16 03:25:02 +04:00
|
|
|
<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"/>
|
2012-02-21 10:51:53 +04:00
|
|
|
<file name="Util.js"/>
|
2012-03-12 10:15:03 +04:00
|
|
|
<file name="renderers/Canvas.js"/>
|
2012-04-17 12:57:25 +04:00
|
|
|
<file name="renderers/SVG.js"/>
|
2012-02-21 10:51:53 +04:00
|
|
|
</sources>
|
|
|
|
</jscomp>
|
|
|
|
<delete file="${build.dir}/${JS_NAME_MIN}.tmp"></delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="release" depends="build-dir,build,syntaxcheck">
|
|
|
|
<jscomp compilationLevel="simple" warning="verbose"
|
|
|
|
debug="false"
|
|
|
|
output="${build.dir}/${JS_NAME_MIN}">
|
|
|
|
<externs dir="${lib.dir}">
|
|
|
|
<file name="${jquery-externs}"/>
|
|
|
|
</externs>
|
|
|
|
<sources dir="${build.dir}">
|
|
|
|
<file name="${JS_NAME}"/>
|
2011-07-16 20:59:15 +04:00
|
|
|
</sources>
|
|
|
|
</jscomp>
|
2011-11-16 03:25:02 +04:00
|
|
|
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME_MIN}" />
|
|
|
|
</target>
|
2011-07-16 20:59:15 +04:00
|
|
|
|
2011-11-16 03:25:02 +04:00
|
|
|
<target name="clean">
|
2012-02-21 10:51:53 +04:00
|
|
|
<delete dir="${build.dir}"></delete>
|
2011-07-16 20:59:15 +04:00
|
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|