I am building a Grails plugin (grails-myorg.zip
) that will contain reusable code/artifacts that should be used by every Grails app in our organization. This includes custom CSS/JS files that help give our apps a consistent look-and-feel.
I'm wondering what the best course of action here is:
- Create a
grails-myorg-themes.zip
plugin, which just includes the reusable CSS and JS files, and then make that a runtime plugin/dependency (usingBuildConfig.groovy
) of the maingrails-myorg.zip
plugin; or - Put the CSS/JS files in the main
grails-myorg.zip
plugin, but then use the Grails resources plugin to configure the files for all downstream dependencies.
Ultimately the only requirement is:
Anytime a developer includes the main grails-myorg.zip
plugin as part of their app's plugins, then the custom CSS/JS files will be available (via URL) at runtime to the app's HTML files. This way, they have the option to include CSS styles and other JS stuff - defined inside these common files - in their apps.
Which strategy should I utilize, why and what would the configuration look like?