nzakas / cssembed

A tool for embedding data URIs in CSS files.
http://www.nczonline.net/
389 stars 30 forks source link

Added Ant task #28

Closed tivac closed 13 years ago

tivac commented 13 years ago

This is based off my max-image-size branch though, so if you don't merge that you'll need to hack out references to that in the options.

(Please don't do that, I find max-image-size super useful)

Running this as a native ant task using helped speed up our site builds by 10x (along w/ using YUI Compressor as an ant task). Definitely something worth having IMO.

<taskdef name="cssembed" classname="net.nczonline.web.cssembed.CSSEmbedTask" classpath="${cssembed}"/>
<cssembed root="${app.public.dir}" skipMissing="true" maxImageSize="@{max-image}">
    <fileset dir="${app.public.dir}" includes="@{filter}" />
</cssembed>