Aaron Leventhal wrote:
>
> Hello,
>
> I've managed to create a multi-file .js component by loading a file and
> eval'ing it. I describe this solution in bug 47974.
>
> So I put the main .js module that loads the others in dist/bin/components.
>
> Where should I put the other .js modules in the Mozilla directory tree?
> I don't want them in dist/bin/components because Mozilla will try to
> load them each as a unique component. Once I do the right thing and use
> the proper location for them, how will I find them without hard-coding
> their locations in the base .js component?
>
> Aaron
If it were up to me, I'd leave them in the same directory to
avoid potential absolute/relative path problems. And keep the JS
Component Loader from trying to load them by giving them a
filename extension other than '.js'. Maybe '.jsl' for 'library'
or '.jsi' for 'include' or whatever.
If we want to go to more trouble, we could 'fix' the JS Component
Loader to not load '.js' files and only load '.jsc' (for
'component') files instead. Then you could leave your included
files using '.js'. No telling what this change would break,
though.
John.