Skip to content

halfbaked/grails-dustjs-resources

 
 

Repository files navigation

#dust JS Resource plugin# This plugin is designed to optimize the use of .dust js files. The processing will compile specified .dust files into their .js counterparts, and place the javascript into the processing chain to be available to the other resource plugin features. The plugin uses the Resources plugin and plays nicely with both the zipped and cached resources plugins. It will also include the core of the dust library which is required to render dust templates on the client.

##Usage## An Example of including a a dust template in your Resources definition file


modules = {
  dust {
    dependsOn 'dustjs'
    resource url: 'dust/test.dust'        
  }
}

###Required Settings for DUST###

  • url: The location of the .dust file relative to the web-app folder

See the Resources plugin for more details on available configurations

##Issues##

  • The plugin uses a modified version of the dust-full-0.4.0.js for compilation. The window object in the script is out of scope and has been replaced with this instead. This plugin will need to be updated when new versions of dustjs are released.
  • Must specify the default bundle manually as this is calculated based on file extension by default.
  • When debug is switched on there is currently no way to fall back to the standard DUST javascript support. The dust files will be rendered unprocessed

##Special Thanks## To Paul Fairless for the grails-lesscss-resources plugin for showing me how to pull this off with a complete rip of his code

About

plugin supports server-side compilation of .dust template files to their .js counterparts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.9%
  • Groovy 6.1%