title: grunt-contrib-requirejs doesn't track all dependencies
body: <p>I'm trying to do r.js optimisation. I have this example project <a href="https://github.com/noppanit/requirejs-optimization-example" rel="nofollow">https://github.com/noppanit/requirejs-optimization-example</a> built with knockoutjs which I use grunt-contrib-requirejs. Everything works fine. But I think grunt-contrib-requirejs doesn't track all of my dependencies</p>
  
  <p>Here's my Gruntfile.js</p>
  
  <pre><code>module.exports = function(grunt){
      grunt.initConfig({
          requirejs: {
              compile: {
                      options: {
                          baseUrl: "./js",
                      paths: {
                          'knockout': 'vendors/knockout/knockout-3.0.0'
                      },
                          mainConfigFile: "js/config.js",
                          name: "application",
                          out: "js/optimized.js"
                      }
              }
          }
      });
  
      grunt.loadNpmTasks('grunt-contrib-requirejs');
  
      grunt.registerTask('default', ['requirejs']);
  };
  </code></pre>
  
  <p>Here's how I include my optimized file</p>
  
  <pre><code>&lt;!DOCTYPE&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div&gt;
          Name: &lt;input type="text" data-bind="value: name"/&gt;
      &lt;/div&gt;
      &lt;div&gt;
          Surname: &lt;input type="text" data-bind="value: surname" /&gt;
      &lt;/div&gt;
  
      &lt;span data-bind="text: fullname"&gt;&lt;/span&gt;
  &lt;/body&gt;
  
  &lt;script type="text/javascript" src="js/require.js" data-main="js/optimized"&gt;
  &lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Here's my config.js</p>
  
  <pre><code>require.config({
      baseUrl: './js',
      paths: {
          'jquery': 'vendors/jquery/jquery-1.11.0',
          'knockout': 'vendors/knockout/knockout-3.0.0',
          'main-viewmodel': 'viewmodels/main_viewmodel',
          'main-call': 'viewmodels/main_call',
      }
  
  });
  </code></pre>
  
  <p>And here's my application.js</p>
  
  <pre><code>require(['config'], function() {
      require(['main-call','knockout']);
  });
  </code></pre>
  
  <p>After I run <code>grunt</code></p>
  
  <p>Here's what I get from optimized.js</p>
  
  <pre><code>require.config({baseUrl:"./js",paths:{jquery:"vendors/jquery/jquery-1.11.0",knockout:"vendors/knockout/knockout-3.0.0","main-viewmodel":"viewmodels/main_viewmodel","main-call":"viewmodels/main_call"}}),define("config",function(){}),require(["config"],function(){require(["main-call","knockout"])}),define("application",function(){});
  </code></pre>
  
  <p>which looks like just the combination of config.js and application.js I expect all the javascript files including requirejs and knockoutjs will be included as well. So the browser would just make one call to get the optimized javascript. </p>