Skip to content

Instantly share code, notes, and snippets.

@peterkeating
Created September 3, 2012 13:07
Show Gist options
  • Save peterkeating/3609221 to your computer and use it in GitHub Desktop.
Save peterkeating/3609221 to your computer and use it in GitHub Desktop.
Converting less to css via Ant build script.
<property name="included.less.stylesheets" value="first.less,second.less"/>
<property name="tool.lessc" value="/build/tools/lessc/lessc.cmd"/>
<property name="css.dir" value="css" />
<property name="less.dir" value="less" />
<target name="-less">
<for param="less.file" list="${included.less.stylesheets}">
<sequential>
<echo>compiling @{less.file} to @{less.file}.css</echo>
<exec dir="${basedir}" executable="${tool.lessc}" failifexecutionfails='true'>
<arg line='"${basedir}/${css.dir}/${less.dir}/@{less.file}" "${basedir}/${css.dir}/@{less.file}.css"' />
</exec>
</sequential>
</for>
</target>
@IRediTOTO
Copy link

Hi, can you please show me how to use this? I just want export less of ant which I custommed to css file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment