clique

Self service RequireJS packages.

(work in progress, see whats still todo)

Clique

Self service RequireJS packages.

npm install clique

Use clique to generate the package url.

var clique = require('clique');

var url = clique.create([
    'http://code.jquery.com/jquery-1.7.2.min.js',
    'http://example.com/some.js'
]);

Now in your template:

'<script type="text/javascript" src="' + url + '"></script>'

In the browser:

require(['http://clique.rhodgson.co.uk/clique.js'], function (clique) {

    var head = document.getElementsByTagName("head")[0],
        script = document.createElement("script");

    script.url = clique.create([
        'http://code.jquery.com/jquery-1.7.2.min.js',
        'http://example.com/some.js'
    ]);

    head.appendChild(script);

});