


Here is the minimum set of compliance tests which use the smallest loader (no modify/plugins/page load/context support) mentioned above. I have put up the different build outputs for 0.0.6 if you want to grab one of the minified versions and play with it. For some, I can see the bare-bones 2.3K gzipped loader a nice way to step into it, and then their users have the option to swap out a more powerful version via a different RunJS build output. I am interested in trying to sell more front-end JavaScript toolkits on this loader.
Runjs alternative upgrade#
The nice thing about the build pragma setup for RunJS, you can upgrade run without having to change your code if you find you want more features, like plugin support, or i18n/text dependency support via plugins. I view run.ready/DOMContentLoaded support more of a necessity for a loader, so unless you already had an implementation for that, I suggest the version that has run.ready() support, which comes in (with license) at 5,867 minifed, 2,522 gzipped. I believe that is the lower limit a functional loader that does nested dependencies via run() module calls.

That size could probably be brought down a tiny bit (probably reaching the 2,000 gzip size) if I were to really be aggressive and remove all context references, but that would be a mess to maintain and there would be no easy upgrade path to multiversion support.
Runjs alternative license#
I need to work on the size of that license block! The one you should use, the one with the license, is 5,245 minified and 2,317 bytes gzipped. That bare bones loader comes in at 5,086 minified and 2,204 gzipped. js files that do not define run.js modules (scripts that do not call run(), for example jQuery, or plugins for jQuery). This version of run has just the following features: The interesting number for me is the version of run.js without plugin support, no run.modify, no multiversion support and no page load (run.ready/DOMContentLoaded callbacks). Including both the i18n and text plugins with run.js bumps it up to 11,759 minified, 4,655 gzipped. The normal config, with no plugins included (but with plugin support) is 7,970 bytes minified, 3,167 gzipped. Google's Closure Compiler did the minification for this evaluation. Let's look at the non-license sizes, since they give a better indication of code density. Here is the breakdown (warning, Google Doc iframe inclusion, but interesting numbers inlined in this post after the iframe): I am trying to get a handle on where the bulk of implementation lies, and what features add to its file size. The build pragma support was used to build RunJS in a couple of different configurations.
