Fork me on GitHub

Curl.js

I like using curl.js because it's very small. Only 7kb minified and gzipped and having all the plugins (css loader, non-AMD js loader, async loader for google maps).

Although there are many options for configuring curl.js here's the minimum you must do

curl({
  'baseUrl': '/', // where to start looking for files, path relative to your app
  'apiName': 'require' // this will make the curl to be registered as window.require
});

RequireJS

RequireJS offers lots of options for your files (maps, shims, packages, aliases). The minimum is:

require.config({
    'baseUrl': '/', // where to start looking for files, path relative to your app
});
Each loader has it's own particular way to resolve the path to files, so learn its details.

Getting it into your head

In the head of your document you should have something like the following

<script src="/vendor/jquery/jquery.js"></script>
<script src="/vendor/curl/curl.js"></script>
<script>
curl({
  'baseUrl': '../js',
  'apiName': 'require'
});
</script>
<script src="/vendor/feaxures/feaxures.js"></script>
<script src="/js/my_feaxures.js"></script>

Niiiice!.... Now, go and configure your first feaxure