5

Is there a recommended method of replacing resources plugin modules when moving to the asset-pipeline plugin? My current best guess is to create empty .js or .css files that require the resources that were in the module, then replace the tags with tags referring to the empty file. If there is a better way to do this, please save me from going down the wrong road. I will be doing this on a fairly large project.

Thanks!

Dave Klein
  • 207
  • 2
  • 10
  • The approach which I took was simple. All of my resources like js and css were copied in to a single file and that file was included in the layout. Whe you create a sample app there is an example on how to use asset-pipeline. Hope that makes sense – allthenutsandbolts Jun 14 '15 at 14:55
  • It all depends on how and where the css/js tags are declared. If you are basing it on ApplicationResources then you can quickly parse and produce relevant tags for assets using something like: (linux/osx) https://github.com/vahidhedayati/documentation/blob/master/grails/shellscripts/parse-js-css.sh I also had to a run a recursive grep looking for resources tag and running the replace script to change those internal gsp tags. I couldn't find it but if needed will try look for it. Try find replace gsp files . https://github.com/vahidhedayati/documentation/blob/master/grails/bash-stuff.md – V H Aug 15 '15 at 13:02

1 Answers1

0

Yes it is recommended to not use the resource plugin as post grails 3 upgrade the resource plugin is deprecated. So you wouldn't have to rework in future.

Eshaan Kumar
  • 69
  • 1
  • 3