title: Requirejs module to use without require
body: <p>I've already read this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/24106613/write-requirejs-modules-that-work-without-requirejs">Write Requirejs modules that work without requirejs</a></p>
  
  <p>and also checked out almond. but I cannot get it to work.</p>
  
  <p>My build file looks like this:</p>
  
  <pre><code>{
      "baseUrl" : "../",
      "name" : "build/almond",
      "include" : ["uploader"],
      "out" : "../uploader.min.js",
      "wrap" : {
          'startFile' : 'start.frag',
          'endFile' : 'end.frag'
      }
  }
  </code></pre>
  
  <p>and my start.frag</p>
  
  <pre><code>(function (root, factory) {
    if (typeof define === 'function') {
      define(factory);
    } else if (typeof exports === 'object') {
      module.exports = factory();
    } else {
      root.Uploader = factory();
    }
  }(this, function () {
  </code></pre>
  
  <p>and my end.frag</p>
  
  <pre><code>    return require('uploader');
  }));
  </code></pre>
  
  <p>It works fine with requirejs.</p>
  
  <pre><code>require(['uploader'], function(Uploader) {
   var uploader = new Uploader();
  });
  </code></pre>
  
  <p>but I want to be able to use it without requirejs so I can just use the script-tag</p>
  
  <pre><code>&lt;script type="text/javascript" src="uploader.js"&gt;&lt;/script&gt;
  &lt;script&gt;
   var uploader = new Uploader();
  &lt;/script&gt;
  </code></pre>
  
  <p>how can I achieve this or do I have to rewrite my library?</p>
  
  <p>I think jQuery does this already.</p>
  
  <p>Any ideas?</p>