Skip to content
GSP Resources Grails plugin
Groovy Gosu
Find file
Pull request Compare This branch is 80 commits ahead of stefankendall:master.
Latest commit ec13c16 Oct 6, 2013 @mckenfra Bugfix: allow same .gsp resource to be included in multiple bundles. …
…Note that this is just a quick fix - the full solution should prevent re-rendering the same .gsp resource every time it appears in a different module.
Failed to load latest commit information.
grails-app
lib
scripts cleanup Sep 13, 2013
src Bugfix: allow same .gsp resource to be included in multiple bundles. … Oct 6, 2013
test/integration/org/grails/plugin/gspresources/test
web-app deleted unused files Sep 13, 2013
.gitignore
GspResourcesGrailsPlugin.groovy
LICENSE.txt init commit - move to git Mar 20, 2011
README.markdown
application.properties

README.markdown

GSP Resources Plugin

This plugin allows you to reference GSP-generated files as cacheable static resources. Consider the following:

fibonacci.js.gsp

<% fib = {n -> return n <= 1 ? n : fib(n-1) + fib(n-2)} %>
var fibonacci = [<%= (0..10).collect{ fib.call(it) }.join(',') %>];

This is then cacheable and serveable as a javascript file:

fibonacci.js

var fibonacci = [0,1,1,2,3,5,8,13,21,34,55];

User Guide

Full documentation here

Special Thanks

Stefan Kendall for creating the original gsp-resources plugin

Something went wrong with that request. Please try again.