This screencast provides an introduction to the Grails Asset-Pipeline plugin for managing and processing static assets like JavaScript and CSS. The Asset-Pipeline plugin is an alternative to the Resources plugin and it is now installed by default starting with Grails 2.4. Thanks for watching!

9 comments so far

Add Your Comment
  1. Nice screen cast.

    One question though:
    If you have a large javascript library for a specific page, isn’t it a waste loading that on all pages? How would you go about that?

  2. @Søren Thanks, glad you liked it! If you want to load JavaScript files only on select pages, you can just use the asset taglib in those specific GSPs (<asset:javascript src=”someLib.js”/>).

  3. Nice, I just noticed the references to asset-pipeline in a test app I was throwing together with grails 2.3.6 – so this screencast is very timely. This looks very cool, should make tweaking Bootstrap much simpler.

  4. Bobby, the plugin looks great. Am currently using Yeoman, bower and grunt for alot of this. Having much that supported directly within Grails as a plugin is much more convenient. Quick question – will you ever be getting compiler support for TypeScript?

  5. Nice presentation.
    What about single page apps with hundreds of JavaScript files? Should I continue using something like Google Closure / Browserify for creating my minified files or can the Asset Pipeline enable JavaScript files to define which files they are also dependent on?

  6. Bobby,
    what’s your opinion of using gsp or in developing with a front-end like Angularjs and grails in the back?


  7. When I use Its not looking in the assets/javascript directory but assets directory .

  8. Hi Bobby,

    How can I prevent that a js such as JQuery.js be loaded twice when I am using a plugin that loads it in its manifest files and I load it also on my app’s manifest files?

  9. Hi that was gr8 tutorial on asset pipeline….i just have one question though….while creating js files for specific page we were using if statement to check whether its our right page and it was our right page we were running that js code…..but actually all the js files for all pages were included…right?…my question keep only specific page js file…so that only 1 js file for that particular page(gsp) is loaded not other ( no conditional checking through data-page etc)….