Skip to content

Commit

Permalink
split files & created build file
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Jul 16, 2011
1 parent 4b7ea7d commit adc30b6
Show file tree
Hide file tree
Showing 30 changed files with 4,106 additions and 652 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/nbproject/private/
/images/
/tests/templates/
/dist/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* The MIT License

* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:

* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.

* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
77 changes: 77 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="html2canvas" basedir=".">
<property name="src.dir" location="src"/>
<property name="lib.dir" location="lib"/>
<property name="build.dir" location="build"/>
<property name="dist" location="dist"/>


<property name="jquery-externs" value="jquery-1.4.4.externs.js"/>


<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"/>


<path id="sourcefiles">
<fileset dir="${src.dir}" includes="LICENSE"/>
<fileset dir="." includes="LICENSE"/>
<fileset dir="${src.dir}" includes="Core.js"/>
<fileset dir="${src.dir}" includes="Background.js"/>
<fileset dir="${src.dir}" includes="Border.js"/>
<fileset dir="${src.dir}" includes="Draw.js"/>
<fileset dir="${src.dir}" includes="Images.js"/>
<fileset dir="${src.dir}" includes="Text.js"/>
<fileset dir="${src.dir}" includes="Traversing.js"/>
<fileset dir="${src.dir}" includes="Util.js"/>
</path>

<path id="jquery-plugin">
<fileset dir="${src.dir}" includes="LICENSE"/>
<fileset dir="." includes="LICENSE"/>
<fileset dir="${src.dir}/plugins" includes="${JQUERY_PLUGIN_NAME}"/>
</path>

<path id="minified">
<fileset dir="${src.dir}" includes="LICENSE"/>
<fileset dir="${build.dir}" includes="tmp.js"/>
</path>

<target name="plugins">
<concat fixlastline="yes" destfile="${build.dir}/${JQUERY_PLUGIN_NAME}">
<path refid="jquery-plugin"/>
</concat>
</target>


<target name="source">
<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
<path refid="sourcefiles"/>
</concat>
</target>


<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
classpath="${lib.dir}/compiler.jar"/>

<target name="release">

<jscomp compilationLevel="simple" warning="verbose"
debug="false"
output="${build.dir}/tmp.js">
<externs dir="${lib.dir}">
<file name="${jquery-externs}"/>
</externs>
<sources dir="${build.dir}">
<file name="${JS_NAME}" />
</sources>
</jscomp>

<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME_MIN}">
<path refid="minified"/>
</concat>

</target>
</project>

Loading

0 comments on commit adc30b6

Please sign in to comment.