Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GSP Resources Grails plugin

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 grails-app
Octocat-spinner-32 lib
Octocat-spinner-32 scripts
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 web-app
Octocat-spinner-32 .gitignore
Octocat-spinner-32 GspResourcesGrailsPlugin.groovy
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.markdown
Octocat-spinner-32 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.