oyvinmar / grails-closure-compiler

Grails Resources Plugin for Google Closure Compiler
Other
7 stars 6 forks source link

disable in certain environments #4

Closed ghost closed 11 years ago

ghost commented 11 years ago

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

oyvinmar commented 11 years ago

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.

ghost commented 11 years ago

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 = ['**/*']
oyvinmar commented 11 years ago

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.

linhpham commented 11 years ago

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

environments {
    development {
        grails.resources.mappers.googleclosurecompiler.disable = true
    }
}
ghost commented 11 years ago

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

oyvinmar commented 11 years ago

I have updated the docs.