[Dojo-interest] Packaging
James Burke
jburke at dojotoolkit.org
Fri Dec 21 22:01:16 UTC 2007
On Dec 21, 2007 2:59 AM, Daniel <daniel.carrera at zmsl.com> wrote:
> This means that the browser has to download 5 files (dojo.js, layer-A,
> layer-B, and the two language files). That's 5 HTTP requests where I
> think I should manage to get away with two. I'd like to combine:
>
> * dojo.js, layer-A.js, layer-A-en-us.js
> * layer-B.js, layer-B-en-us.js
There is not a way to do this in the build tool today. i18n bundles
are loaded on demand since the language determination is usually a
value determined at runtime. However, feel free to open an enhancement
ticket in trac if you think it is useful.
I think you can fake it today by manually injecting the i18n bundle
contents in your layer file but do it right before the
dojo._preloadLocalizations call that is near the end of the layer
file.
You can combine dojo.js and layer-A.js into one file by renaming the
first layer in your build to "dojo.js" and putting the layer-A
dependencies in that layer. The normal suggestion is to keep dojo.js
to be the same contents all the time, but if you want to cut down on
the requests and you are not exporting code out for others then you
can build your stuff in with dojo.js.
James
More information about the Dojo-interest
mailing list