title: requireJS and namespaces
body: <p>I am trying to use a namespace with <code>requireJS</code> and facing some problems. So far I have:</p>
  
  <pre><code>require.config({
    paths: {
        jquery: [
            'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min'
          ],
        jqueryUI: 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min',
        main: 'http://mysite.com/main'
    }
  });
  </code></pre>
  
  <p>and then I am trying to load</p>
  
  <pre><code>require(['jquery', 'main'], function($) {
      myApp.core.init();
  });
  </code></pre>
  
  <p>where <code>main.js</code> contains my namespace variable like <code>myApp</code> - however it's telling that jQuery is undefined for the <code>myApp</code> which infers that all my code inside</p>
  
  <pre><code>(function(myApp, $, undefined) {
  
  }(window.myApp = window.myApp || {}, jQuery));
  </code></pre>
  
  <p>wont' work ? Can someone help ?</p>