title: How to optimize all javascript files in a directory with requirejs
body: <p>I have a folder structure like this:</p>
  
  <pre><code>.
  ├── autocomplete
  │   ├── core.js
  │   ├── search.js
  │   └── user.js
  ├── build.js
  ├── collapsible_lists.js
  ├── griffgrabber
  │   ├── canvasobject.js
  │   ├── cargame.js
  │   ├── car.js
  │   ├── griffDrawer.js
  │   ├── keylistener.js
  │   ├── run.js
  │   └── victim.js
  ├── main.js
  ├── newsfeed.js
  ├── require.js
  ├── shortcut.js
  └── sidebar.js
  
  3 directories, 20 files
  </code></pre>
  
  <p>main.js is the startup file. That file requires a couple of the files, but not all of them. The rest of the files are included with</p>
  
  <pre><code>&lt;script&gt;
      require(['shortcut'], function(shortcut){
          // ...
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>in some html files.</p>
  
  <p>This is my build.js file so far:</p>
  
  <pre><code>{
      baseUrl: ".",
      name: "main",
      out: "main-built.js",
  }
  </code></pre>
  
  <p>But it only includes the files that are required by main.js. Is it possible to optimize all the javascript files in one run?</p>