title: How to goog.require JQuery from CDN?
body: <p>I am currently <a href="https://github.com/highsource/javascript-module-loaders-comparison" rel="nofollow">experimenting</a> with different JavaScript module formats and loader and also wanted to try out <a href="https://developers.google.com/closure/library" rel="nofollow">Google Closure</a>.</p>
  
  <p>I've got the <a href="https://rawgit.com/highsource/javascript-module-loaders-comparison/master/GoogleClosure/Simple/index.html" rel="nofollow">basic example</a> working, but can't figure out how to use <code>goog.require</code> for an external library. Let's take <a href="https://code.jquery.com/jquery-2.1.3.min.js" rel="nofollow">JQuery from CDN</a>, for example.</p>
  
  <p>Right now I'm doing the following. In the HTML page:</p>
  
  <pre><code>&lt;script src="https://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And in the script:</p>
  
  <pre><code>goog.require("Greets");
  goog.provide("Greets.MsgDivMessenger");
  
  Greets.MsgDivMessenger = function() {};
  Greets.MsgDivMessenger.prototype.sendMessage = function(message)
  {
      $('#msg').text(message);
  };
  </code></pre>
  
  <p>This works as the global <code>$</code> is included via the <code>&lt;script .../&gt;</code> tag in the HTML page itself.</p>
  
  <p>But what I'd like to do is to load JQuery via <code>goog.require</code>, <em>without</em> the <code>&lt;script .../&gt;</code> tag in the HTML page:</p>
  
  <pre><code>goog.require("Greets");
  goog.require("$");
  goog.provide("Greets.MsgDivMessenger");
  
  Greets.MsgDivMessenger = function() {};
  Greets.MsgDivMessenger.prototype.sendMessage = function(message)
  {
      $('#msg').text(message);
  };
  </code></pre>
  
  <p>I have tried adding JQuery CDN URL as dependency:</p>
  
  <pre><code>goog.addDependency('https://code.jquery.com/jquery-2.1.3.min.js', ['$'], []);
  </code></pre>
  
  <p>But this did not work, <code>goog.require</code> has tried to load <code>.../closure/goog/https://code.jquery.com/jquery-2.1.3.min.js</code> instead.</p>
  
  <p>Yes, I know that I don't need JQuery for <code>$('msg')</code>, but the point is to manage modules (including external ones) with Google Closure.</p>
  
  <p>How could I <code>goog.require</code> JQuery from CDN?</p>