(Quick Reference)

3 Usage - Reference Documentation

Authors:

Version: 0.4.4

3 Usage

In your project resources file, define GSPs as resources like any other resource type:

'style' {
    resource url:'css/test.css.gsp'
}

The GSP will be compiled to a file with exactly the same URI, but minus the '.gsp' extension. The type of the compiled file (i.e. in this case 'css') will be automatically detected from the filename. Should you wish to name your file with a file extension that is not recognised by the resources plugin, you can optionally explicitly define the file type of the compiled resource using the following example configuration:

'style' {
    resource url:'somefile.gsp', attrs:[rel: 'stylesheet/css', type:'css']
}

Note the additional attrs parameter, which is used to tell the resources plugin the type of the resource being generated. (In this example, the compiled file will simply be named 'somefile' with no extension.)