adamldavis / groocss

GrooCSS - code CSS in Groovy

Home Page:http://groocss.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New extension methods did not work from within custom code in build.gradle

adamldavis opened this issue · comments

For example:

task css2 doLast {
    def config = new Config(prettyPrint: true)
    def out = file("$cssDir/out.css")
    GrooCSS.process(config) {
        table {
            border 2.em
        }
        'formId'.id {
            color white
        }
    }.writeTo(out)
}

OR

task css2 doLast {
  GrooCSS.convert(config, file("index.groocss"), file("$cssDir/index2.css"))
}

WORK-AROUND: Call new GrooCSS().initMetaClasses() before the "process" line.

Fixed by setting addMeta=true by default