oyvinmar/grails-closure-compiler

disable in certain environments

Closed this issue · 6 comments

Is it possible to disable this plugin in certain environments (e.g. dev)

Yes, you can use the debug option in the Resources plugin

grails.resources.debug = true

See http://grails-plugins.github.com/grails-resources/guide/8.%20Debugging.html for more info.

Thanks, I didn't know about this config option. As far as I can tell that will disable all resource processing. It would be nice if there was a way to disable just this plugin. Most other resource plugins seem to provide this, for example:

    grails.resources.mappers.yuicssminify.disable = true
    grails.resources.mappers.hashandcache.excludes = ['**/*']

Yeah, I can see that it could be an useful feature. I'll consider adding when I have some spare time. You're also welcome to submit a pull request.

In the source code GoogleClosureCompilerResourceMapper, I can see a way to disable the plugin:

environments {
    development {
        grails.resources.mappers.googleclosurecompiler.disable = true
    }
}

I tested the suggestion from @linhpham and it works, so once this info is added to the docs, this issue should be closed.

I have updated the docs.