I don't see a requirement of having grails-myorg-themes
plugin if sole purpose of grails-myorg
is just to be a provider for resources to a grails app.
Second option looks like a good start for the scenario that has been laid out. If resources change and/or updated, versioning the plugin up would suffice.
What:
- You would not need resources plugin in the plugin, app should be using resources plugin. If at all resources plugin is used in
grails-myorg
plugin then it should be excluded in the package by usingexport = false
in build config. - Create business specific resources modules which can be used in the app effortlessly. For example:
Plugin resources file should have something like below, highlighting dashboard
(say, a enterprise wide module which reflects the brand) as a module which can be required
in app in specific pages/templates.
//MyOrgResources.groovy
modules = {
dashboard {
resource url: 'js/dashboard/dashboard.js'
resource url: 'css/dashboard/dashboard.css'
}
}
So on and so forth for common domain specific resources.
Why:
The plugin is self explanatory in mentioning that "any enterprise level resource, related to a domain or a module" can be referred from this plugin. In the end, it will be a useful idea only if the plugin is documented and shared appropriately across teams, so that no one re-invents the wheel.