title: Play 2.3.x + Webjars + Requirejs And Transitive Dependencies
body: <h1>Questions:</h1>
  <ul>
  <li>Is there a way to avoid manually defining paths and shims in requirejs for webjars and all their transitive dependencies?  (Or at least for webjars that come with a requirejs.config() call)?</li>
  <li>Is there a simple example (or seed) of a Play 2.3 app that uses webjars and requirejs with javascript packages that have transitive dependencies?  (Where each transitive dependency doesn't have to be manually configured with a shim in the app's requirejs config block?)</li>
  </ul>
  <h1>Problem Description:</h1>
  <p>I'm migrating a project to play 2.3 and am running into some issues grok-ing how webjars+requirejs are supposed to integrate.  Simple problem that illustrates my confusion:</p>
  <p>I want to use angular-ui-calendar (<a href="https://github.com/webjars/angular-ui-calendar" rel="nofollow noreferrer">https://github.com/webjars/angular-ui-calendar</a>), so I add the following to build.sbt:</p>
  <pre><code>&quot;org.webjars&quot; % &quot;angular-ui-calendar&quot; % &quot;0.8.1&quot;
  </code></pre>
  <p>After the update, sbt pulls down the angular-ui-calendar web jar, as well as the dependencies specified in its pom.xml (jquery-ui and fullcalendar).</p>
  <p>To use any of it though, I have to add a bunch of paths and shims to main.js containing my requirejs config... basically:</p>
  <pre><code>requirejs.config({
      paths: {
          'angular-ui-calendar' : ['../lib/angular-ui-calendar/calendar'],
          'jquery-ui' : ['../lib/jquery-ui/jquery-ui']
           /* ... */
      },
      shim: {
          'angular':
             exports: 'angular'
          'angular-ui-calendar':
             deps: ['angular', 'jquery-ui', 'fullcalendar']
             /* ... */
      }
   });
  </code></pre>
  <p>If all this manual shimming is necessary, what's the point of the requirejs.config()'s defined in some webjars? (For example: <a href="https://github.com/webjars/angular-ui-bootstrap/blob/master/src/main/resources/webjars-requirejs.js" rel="nofollow noreferrer">https://github.com/webjars/angular-ui-bootstrap/blob/master/src/main/resources/webjars-requirejs.js</a>)</p>