gradle-css-plugin icon indicating copy to clipboard operation
gradle-css-plugin copied to clipboard

Unable to compile Twitter Bootstrap less

Open nullpainter opened this issue 10 years ago • 0 comments

I'm using gradle-css-plugin 1.8.2 and Gradle 1.8.

Twitter Bootstrap uses a single bootstrap.less file which uses @import to include all sub-components. I am therefore using the plugin as so:

css.source {
  less {
    css {
      srcDir "src/main/webapp/bootstrap/less"
      include "bootstrap.less"
    }
  }
}

However, this results in the following error when running the lesscss task:

> Less compilation error at src/main/webapp/bootstrap/less/bootstrap.less:0
  org.mozilla.javascript.EcmaError: TypeError: Cannot call method "toCSS" of undefined (file:/Users/matt/.gradle/caches/artifacts-26/filestore/com.asual.lesscss/lesscss-engine/1.3.0/jar/901d3011fa670f9e90bd4f83994bf81d1b0f067d/lesscss-engine-1.3.0.jar!/META-INF/engine.js#67)

FWIW, the other gradle less plugin at https://github.com/obecker/gradle-lesscss-plugin works fine using this approach. However, I'd really like all of the other features provided by gradle-css-plugin so am loathe to switch. This is using Bootstrap 2.3.2.

nullpainter avatar Jan 28 '14 04:01 nullpainter