forked from qTip2/qTip2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ANT buildfile, updated README and optimized images.
Added new Apache Ant build.xml file for those without access to *nix make. README has been updated to reflect this. Also optimized images using Yahoo's SmushIt service, resulting in a 93%(!) lossless filesize reduction. Makefile has also been optimized slightly and .gitattributes file removed as it was causing problems with commits.
- Loading branch information
Showing
10 changed files
with
173 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<project name="qTip" default="all" basedir="."> | ||
|
||
<loadfile property="version" srcfile="version.txt" /> | ||
<exec outputproperty="date" executable="git" > | ||
<arg line="log --pretty=format:'%ad' -1" /> | ||
</exec> | ||
|
||
<property name="BUILD_DIR" value="./build" description="Build folder" /> | ||
<property name="SRC_DIR" value="./src" description="Source folder" /> | ||
<property name="DIST_DIR" value="./dist" description="Compiled qTip folder" /> | ||
<property name="IMG_DIR" value="./images" description="Images folder" /> | ||
|
||
<property name="QTIP" value="${DIST_DIR}/jquery.qtip.js" /> | ||
<property name="QTIP_MIN" value="${DIST_DIR}/jquery.qtip.min.js" /> | ||
<property name="QTIP_PACK" value="${DIST_DIR}/jquery.qtip.pack.js" /> | ||
<property name="QTIP_CSS" value="${DIST_DIR}/jquery.qtip.css" /> | ||
<property name="QTIP_IMG" value="${DIST_DIR}/images" /> | ||
|
||
<target name="all" depends="clean,qtip,css,images,min,pack,lint" description="Builds qTip including minified, packed JS files, as well as images and CSS" /> | ||
|
||
<target name="dir" description="Builds distribution directory"> | ||
<mkdir dir="${DIST_DIR}" /> | ||
</target> | ||
|
||
<target name="qtip" depends="dir" description="Main qTip build. Concatenates source and css files and replaces @VERSION/Date"> | ||
<echo message="Building ${QTIP}" /> | ||
|
||
<concat destfile="${QTIP}"> | ||
<fileset file="${SRC_DIR}/header.txt" /> | ||
<fileset file="${SRC_DIR}/intro.js" /> | ||
<fileset file="${SRC_DIR}/core.js" /> | ||
<fileset file="${SRC_DIR}/ajax.js" /> | ||
<fileset file="${SRC_DIR}/tips.js" /> | ||
<fileset file="${SRC_DIR}/imagemap.js" /> | ||
<fileset file="${SRC_DIR}/modal.js" /> | ||
<fileset file="${SRC_DIR}/ie6.js" /> | ||
<fileset file="${SRC_DIR}/outro.js" /> | ||
</concat> | ||
|
||
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${QTIP}" /> | ||
<replaceregexp match="Date: " replace="Date: ${date}" file="${QTIP}" /> | ||
|
||
<echo message="${QTIP} built." /> | ||
</target> | ||
|
||
<target name="min" depends="qtip" description="Remove all comments and whitespace, no compression, great in combination with GZip"> | ||
<echo message="Building ${QTIP_MIN}" /> | ||
|
||
<apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}"> | ||
<fileset dir="${DIST_DIR}"> | ||
<include name="jquery.qtip.js" /> | ||
</fileset> | ||
|
||
<arg line="-jar" /> | ||
<arg path="${BUILD_DIR}/compiler.jar" /> | ||
<arg value="--warning_level" /> | ||
<arg value="QUIET" /> | ||
<arg value="--js_output_file" /> | ||
<targetfile /> | ||
<arg value="--js" /> | ||
<mapper type="glob" from="jquery.qtip.js" to="tmpmin" /> | ||
</apply> | ||
|
||
<concat destfile="${QTIP_MIN}"> | ||
<filelist files="${QTIP}, dist/tmpmin" /> | ||
<filterchain> | ||
<headfilter lines="18" /> | ||
</filterchain> | ||
</concat> | ||
|
||
<concat destfile="${QTIP_MIN}" append="yes"> | ||
<filelist files="dist/tmpmin" /> | ||
</concat> | ||
<delete file="dist/tmpmin"/> | ||
|
||
<echo message="${QTIP_MIN} built." /> | ||
</target> | ||
|
||
<target name="pack" depends="min" description="Compresses minified qTip source for even smaller file-sizes"> | ||
<echo message="Building ${QTIP_PACK}" /> | ||
|
||
<apply executable="java" parallel="false" verbose="true"> | ||
<fileset dir="${DIST_DIR}"> | ||
<include name="jquery.qtip.js" /> | ||
</fileset> | ||
|
||
<arg line="-jar" /> | ||
<arg path="${BUILD_DIR}/js.jar" /> | ||
<arg value="${BUILD_DIR}/packer.js" /> | ||
<arg value="${QTIP_MIN}" /> | ||
<arg value="${QTIP_PACK}.tmp" /> | ||
</apply> | ||
|
||
<concat destfile="${QTIP_PACK}"> | ||
<filelist files="${QTIP}, ${QTIP_PACK}.tmp" /> | ||
<filterchain> | ||
<headfilter lines="18" /> | ||
</filterchain> | ||
</concat> | ||
|
||
<concat destfile="${QTIP_PACK}" append="yes"> | ||
<filelist files="${QTIP_PACK}.tmp" /> | ||
</concat> | ||
<delete file="${QTIP_PACK}.tmp"/> | ||
|
||
<echo message="${QTIP_PACK} built." /> | ||
</target> | ||
|
||
<target name="css" depends="dir" description="Builds qTip CSS file"> | ||
<echo message="Building ${QTIP_CSS}" /> | ||
|
||
<concat destfile="${QTIP_CSS}"> | ||
<fileset file="${SRC_DIR}/header.txt" /> | ||
<fileset file="${SRC_DIR}/core.css" /> | ||
<fileset file="${SRC_DIR}/tips.css" /> | ||
<fileset file="${SRC_DIR}/modal.css" /> | ||
<fileset file="${SRC_DIR}/extra.css" /> | ||
</concat> | ||
|
||
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${QTIP}" /> | ||
<replaceregexp match="Date: " replace="Date: ${date}" file="${QTIP_CSS}" /> | ||
|
||
<echo message="${QTIP_CSS} built." /> | ||
</target> | ||
|
||
<target name="images" depends="dir" description="Builds images directory"> | ||
<echo message="Building ${QTIP_IMG}" /> | ||
|
||
<mkdir dir="${QTIP_IMG}" /> | ||
<copy todir="${QTIP_IMG}"> | ||
<fileset dir="${IMG_DIR}"> | ||
<include name="**/*.png"/> | ||
</fileset> | ||
</copy> | ||
|
||
<echo message="${QTIP_IMG} built." /> | ||
</target> | ||
|
||
<target name="lint" description="Builds and checks the qTip source with JSLint"> | ||
<echo message="Checking qTip against JSLint..." /> | ||
|
||
<exec executable="java"> | ||
<arg line="-jar" /> | ||
<arg path="${BUILD_DIR}/js.jar" /> | ||
<arg value="${BUILD_DIR}/jslint-check.js" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="clean"> | ||
<delete dir="${DIST_DIR}" /> | ||
</target> | ||
</project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.