Le 20
>> Thank you Eric for this thorough explanation.  To put things into
>> perspective, if I wanted to have the leanest possible OL lib with the
>> MapFish build I could exclude selected MapFish components from the build and
>> that would cascade down to OL ?
>>      
> Yes, this will produce the leanest MF+GX+OL build.
>    

Hi Eric,

I did a small test that I'd like to tell you about.  I created 
"dummy.js" at the root of OL.  I added "rummy.js" one level down the 
directory tree.  If I run the build script, both files get included, as 
expected.  dummy.js gets included first and rummy.js gets included after 
in the compressed file.  At first I thought dummy.js was included first 
because it was at the root of OpenLayers and rummy.js was one tree level 
down, but it looks like it's just because files are ordered 
alphabetically.  If I put a file called dummy-3.js at the same location 
as rummy.js, it will get included *before* dummy.js.  I'm not sure why, 
but I'll take it.

Now if I add a dependency in dummy.js like so :

/**
  * @requires OpenLayers/rummy.js
  */

I should expect its contents to be included in the compressed file 
before dummy.js.  Checked.

Now the question I had was : if I put dummy.js in the exclude part of 
jsbuild's .cfg file, should I expect *both* dummy.js and it's required 
contents (rummy.js) to be excluded from the build ?  I thought that's 
what I would get, but the answer is no.  Only dummy.js' content is 
excluded.

The rationale for me is that @requires is an "include" dependency, but 
not an "exclude" dependency.  That is, i can't rely on dummy.js being 
excluded from the compressed file given that dummy.js shows in the list 
of excludes.  It's understandable because there may be other files 
besides dummy.js that @include or @requires rummy.js.  So my question is 
: how can MapFish cascade "exclude dependencies" and produce a lean 
compressed js file ?

Also, I noted that putting dummy.js in the list of `first` includes in 
the jsbuild cfg file does indeed put dummy.js right up the top of the 
compressed js file, but rummy.js's content is *not* included before, 
which it should.  So one cannot really prepend a js file that has 
@requires dependencies.  Are we left with manually specifying 
include/exclude dependencies ?

Cheers,

Yves

>    
>> If I wanted for example to not include the
>> OL code for vector layers all I'd have to do is find the right MapFish
>> component to exclude and that would cascade things down to exclude the
>> required OL files and whatever GeoExt dependencies those excluded MapFish
>> components may have ?
>>      
> Yes.
>
>
>    

_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to