title: Grails Asset-Pipeline system with 3rd party libs
body: <p><strong>Grails</strong> 2.4 is now using the <strong>Asset Pipeline</strong> for managing and processing static assets in Grails applications instead of the Resources system. This is pretty new and there isn't much doc about it on the internet yet.</p>
  
  <p>My question is, how to correctly handle 3rd party libraries?</p>
  
  <p>For instance, the <strong>select2</strong> (<a href="http://ivaynberg.github.io/select2/" rel="noreferrer">http://ivaynberg.github.io/select2/</a>) library comes with all its .css, .js, image files in a single flat folder.</p>
  
  <p>Should I copy the different file types in to their corresponding <code>assets/javascripts/</code>, <code>assets/stylesheets/</code>, etc. subfolders? What to do with files that don't really have an obvious location like the .json, text, or doc files?</p>
  
  <p>Should I create a <code>vendors/select2/</code> folder? Where, in <code>assets/</code> or in <code>web-app/</code>? And then, how should I load all the necessary files from my GSPs?</p>
  
  <p>This lib will also be needed only in a form view, and therefore shouldn't be loaded unless it's needed.</p>