Skip to content

Instantly share code, notes, and snippets.

@steadweb
Created March 1, 2013 08:29
Show Gist options
  • Save steadweb/5063257 to your computer and use it in GitHub Desktop.
Save steadweb/5063257 to your computer and use it in GitHub Desktop.
LESS ant build script.
<?xml version="1.0" ?>
<project default="default" basedir=".">
<target name="default" depends="init, less" />
<target name="init">
<echo>-- Initialize Variables</echo>
<property name="less.path" value="httpdocs/assets/less" />
<echo message="less.path: ${less.path}" />
<property name="build.path" value="httpdocs/assets/css" />
<echo message="build.path: ${build.path}" />
<echo></echo>
<echo>-- Tools</echo>
<property name="lessc.path" value="ant/less/bin/lessc" />
<echo message="lessc.path: ${lessc.path}" />
<property name="googleClosureCompiler.path" value="ant/google-closure-compiler.20121212.r2388.jar" />
<echo message="googleClosureCompiler.path: ${googleClosureCompiler.path}" />
</target>
<target name="less" depends="init">
<echo># Convert LESS to CSS (Minified using YUI Compressor)</echo>
<echo>${lessc.path} ${less.path}/daisy.less > ${build.path}/daisy.css</echo>
<exec executable="${lessc.path}" output="${build.path}/daisy.css" failonerror="true">
<arg line="${less.path}/daisy.less" />
<arg line="--yui-compress" />
</exec>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment