joergrech / KickstartWithBootstrap

Kickstart is an extension for Grails in order to start your project with a good looking frontend. It is intended to be used in rapid application scenarios such as a Startup Weekend or a prototyping session with a customer. This plugin provides adapted scaffolding templates for standard CRUD pages using Twitter's CSS Framework Bootstrap and offers some basic pages for a web site.
65 stars 52 forks source link

Reworking how resources are processed. #40

Closed csherstan closed 11 years ago

csherstan commented 11 years ago

Dependency injection for customPropertyEditorRegistrar was being handled by directly copying a copy of resources.groovy into the project using the kickstart script. An improved way to do this in a plugin is setup your dependency injection in the doWithSpring closure of your plugin file (KickstartWithBootstrapGrailsPlugin). This way we do not need to copy files in and potentially clobber things in the existing resources.groovy.

In order to do this CustomDateEditorRegistrar could not be in the default package. I refactored all the code to put src files in the com.joergrech.kickstartwithbootstrap package (this is the recommended style of package names). Note that the default, no package, should generally not be used.

Additionally, lesscss-resources has now been upgraded to use less-css:1.3.3 and I have updated BuildConfig.groovy accordingly.

Finally, there were several places where the deprecated ApplicationHolder was being used. I removed those references and replaced them with preferred methods of obtaining the various resources.

joergrech commented 11 years ago

Thanks for the code and tips. I integrated much but also changed many details.