I cannot find Preload.js

2 views
Skip to first unread message

Domenico Testa

unread,
Jul 28, 2008, 6:30:18 AM7/28/08
to Chiron JavaScript
I've read a nice AJAXIAN.com article on modules.js and after a few
minutes i've found myself integrating it in my own ExtJS solution.

In the tutorial i can see a link to a preload script i would use to
pack and concatenate the modules loaded by modules.js but i cannot
find it.

I would reduce the total http reqs number and the script size of my js
application. Any help is appreciated.
Regards.

Kris Kowal

unread,
Jul 28, 2008, 2:39:38 PM7/28/08
to chir...@googlegroups.com
I'll have to update the tutorial. I'm calling the preload scripts
"bundles" now. You can make a bundle with the script:

https://cixar.com/svns/javascript/trunk/bin/build.bundle <dir>

Which is part of the regular Chiron build process:

https://cixar.com/svns/javascript/trunk/bin/build

You'll be the first to provide feedback on this particular aspect of
the project, so don't hesitate to complain about it's shining
inadequacies as you find them. I'd like to make it easier for people
to use this in their own projects. The first shortcoming no doubt is
documentation so I'll attempt to fill the gap here.

build.bundle runs in the parent directory of bin, which is assumed to
be the same directory that contains the Chiron src/ dir. The script
reads a src/bundle.manifest file.

https://cixar.com/svns/javascript/trunk/src/bundle.manifest

This file contains a list of JavaScript modules that should be
transformed into bundle files (modules that preload all of their
potential dependencies). build.bundle accepts the name of a
destination directory for the build, which is by default chiron-r#/
for whatever version of the repository is checked out. So far, I only
use this process as part of the nightly build:

https://modulesjs.com/nightly/

Which is just a checkout of trunk in which the build script runs every night.

For your particular need, I should decouple a "bundle" script from the
"build.bundle" process so you can run it on a particular file or list
of files that you want to bundle. More as it comes. Thanks,

Kris

Reply all
Reply to author
Forward
0 new messages