paulfairless / grails-lesscss-resources

Grails plugin for using the LESS CSS framework in conjunction with the grails-resource plugin family
Other
35 stars 27 forks source link

Problems compiling Bootstrap 2.3 less files #45

Closed joergrech closed 11 years ago

joergrech commented 11 years ago

I just tried to compile the standard Bootstrap 2.3 less files and got the following error:

"Message: Syntax Error on line 891"

It works with Bootstrap 2.2.2 - so probably Bootstrap introduced something new but maybe you can help.

fblumenberg commented 11 years ago

This is due to the changes in the commit https://github.com/twitter/bootstrap/commit/6b9bb547bf275d8723d50b16fbb22ba9e334da39 at bootstrap

"Move to new selector interpolation, supported from 1.3.1"

mjpowersjr commented 11 years ago

It seems that this issue is resolved in newer versions of the lesscss java compiler...I updated the lesscss compiler dependency from 1.3.1 -> 1.3.3 in a local copy of this grails plugin, and was able to successfully compile the previously mentioned Boostrap .less file.

rhysyngsun commented 11 years ago

Alternative to using a local copy of the plugin is to modify BuildConfig.groovy in the following way:

grails.project.dependency.resolution = {
    dependencies {
        runtime ('org.lesscss:lesscss:1.3.3')
    }
    plugins {
        compile(":lesscss-resources:1.3.1") {
            excludes "lesscss"
        }
    }
}
joergrech commented 11 years ago

I just tested it and the approach by @rhysyngsun works great. I hope you can integrate it in the next release of the plugin. Thanks Joerg.