An open API service indexing awesome lists of open source software.

https://github.com/fitzgen/loader

A smart, parallel client-side Javascript loader written in ParenScript
https://github.com/fitzgen/loader

Last synced: 4 months ago
JSON representation

A smart, parallel client-side Javascript loader written in ParenScript

Awesome Lists containing this project

README

          

# `$loader`

Speed up your pages by transforming







$(document).read(function () {
doSomeStuff();
// ...
});

in to


// jQuery and Wu are loaded in parallel.

$loader.load(["jquery.min.js", "wu.js"])

// The jQuery plugins are loaded in parallel as well, but only after
// jQuery is already loaded and evaluated.

.load(["jquery.tempest.js", "jquery.lightbox.js", "jquery.autocomplete.js"],
function () {
doSomeStuff();
// ...
});

## Getting up and running

`$loader` is written in [ParenScript][] (a small, Lispy language that compiles
to Javascript), to build the latest source, you will need a Common Lisp
implementation (my build script targets [Steel Bank Common Lisp][]) and
ParenScript. Then just run

./build

If you just want to get up and running quickly, I will put prebuilt, minified
versions up on the GitHub [downloads page][] as soon as there is some stability.

[ParenScript]: http://common-lisp.net/project/parenscript/
[Steel Bank Common Lisp]: http://sbcl.sourceforge.net/
[downloads page]: http://github.com/fitzgen/loader/downloads