Created
September 5, 2011 20:55
-
-
Save philmander/1195897 to your computer and use it in GitHub Desktop.
Data URIs and automation with CSSEmbed and Ant 1
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
<?xml version="1.0"?> | |
<project default="cssDataUriEmbed" basedir="." xmlns:ca="antlib:net.sourceforge.clearantlib"> | |
<property name="build.dir" location="${basedir}/build" /> | |
<property name="websrc.dir" location="${basedir}/WebContent" /> | |
<taskdef name="cssurlembed" classname="net.nczonline.web.cssembed.CSSEmbedAntTask" > | |
<classpath> | |
<fileset dir="${basedir}/lib" includes="cssembed-0.3.3.jar"/> | |
</classpath> | |
</taskdef> | |
<target name="setup"> | |
<delete dir="${build.dir}" /> | |
<copy todir="${build.dir}"> | |
<fileset dir="${websrc.dir}" /> | |
</copy> | |
</target> | |
<target name="cssDataUriEmbed" depends="setup" > | |
<!--Standard embed--> | |
<cssurlembed | |
root="${build.dir}" | |
fromdir="${websrc.dir}/css" destdir="${build.dir}/css" suffix="-datauri"> | |
<include name="site.css"/> | |
</cssurlembed> | |
<!--MHTML embed--> | |
<cssurlembed | |
root="${build.dir}" | |
mhtml="true" mhtmlRoot="http://www.mydomain.com" | |
fromdir="${websrc.dir}/css" destdir="${build.dir}/css" suffix="-mhtml"> | |
<include name="site.css"/> | |
</cssurlembed> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment