James Margaris writes:
>Sounds good, question:
>
>If I have this:
>
><mco src="com.myCompany.myMco"/>
>
>What happens? We will try to make a new com.myCompany.myMco, that that
doesn't exist will we do a require() on it? To me >that would make the
most sense.
>
>1. IF there is a path, load from that path 2. If there isn't, try a
require on the src
That's the order now. I didn't include a note about the require()
because there seems to be problem with
the paths resolution, or else I put the file in the wrong place. This
wll take future work, but I left
the Xap.require() call is in there as a placeholder.
On paths resolution: I would suggest that the developer be able to alter
and add to the default paths currently set in Xap.js with entries in
XapConfig. Currently, we have
dojo.hostenv.setModulePrefix("dojo", "../dojo/src");
dojo.hostenv.setModulePrefix("xap", "../xap");
dojo.hostenv.setModulePrefix("google", "../google");
...but this ties users to the current directory structure as staged.
A user _could_ alter these or add to them within an html file's
<script/> tag, but that's awkward; I would like to see something like:
<module-maps>
<module-map module-prefix="dojo" module-path="../dojo/src" />
<module-map module-prefix="xap" module-path="../xap" />
<module-map module-prefix="google" module-path="../google" />
<!-- New one -->
<module-map module-prefix="mymcos" module-path="../add_ons/mcos"
/>
</module-maps>