In comp.lang.javascript message <11**********************@w5g2000hsg.goo
glegroups.com>, Mon, 14 May 2007 13:11:59, Mel <Me*******@gmail.com>
posted:
>is there a way of pointing to a directory where all JScripts are
living and let it pick and choose what it needs from which scripts or
do I have to do the picking through files each time I write a script
that depends on others ?
To the question as asked, AFAIK no, at run time.
An author can of course write an authoring tool that, given the name of
a function or other variable, will search within a directory and import
its definition.
My "javascript library" is contained within about 5 *.js files,
classified by topic, and on each page that needs to use routines from it
I include the corresponding file by reference, by for example
<script type="text/javascript" src="include1.js"></script>
See <URL:http://www.merlyn.demon.co.uk/js-nclds.htm.>
Normally I know which file a function is in; otherwise, I use a search
tool such as MiniTrue.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/unsupported.