h5bp/ant-build-script — pull request #54 by rolos79 (2012-04-18 11:38:48+00:00)
Title: Adding LESS CSS to Ant build

Hi,

I think I've managed to add optional compilation of LESS files into the h5bp ant build script.

The script compiles LESS CSS to pure CSS and also removes any references to the LESS JavaScript in your HTML.

To test my fork follow these steps.

1. Create a LESS file in the css folder e.g. style.less and add some LESS code.
2. In default.properties make these changes:
file.root.stylesheet = style.less
build.css.less = true
3. Run ant.

Known issues:

The build uses a rhino version of the LESS JavaScript file from the LESS git repo. Currently the Rhino script is only at version 1.1.5 but the LESS framework is at 1.3.0. Hopefully we can update the Rhino version soon.

I've tested this will the examples from the LESS homepage and it appears to be working fine. Also as I've integrated it with the current CSS processing @import, minification and filename hash should continue to work with LESS.

Let me know what you think.

Chris Rowe