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
- Host: GitHub
- URL: https://github.com/fitzgen/loader
- Owner: fitzgen
- Created: 2010-07-13T23:43:26.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2010-07-15T16:03:28.000Z (almost 16 years ago)
- Last Synced: 2025-10-29T00:53:01.851Z (8 months ago)
- Language: Common Lisp
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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