Subj : Re: load() search paths... To : Deuce From : Ragnarok Date : Sat Aug 08 2009 11:49 am Deuce escribió: > So, after looking at the vast (and increasing) number of *.js files in the exec > directory which are not intended to be executed but are instead intended to be > load()ed by some other script, I've started thinking about a library system for > the JS load() method. My initial thoughts are something like the following: > > - There be some array of search paths for load() which can be added to by a > script. Additions can be at either end of the array, and these paths can be > either absolute or relative. > - If the path is absolute, only a single directory will be searched. > - If the path is relative, two directories will be searched, a "mods" > style directory and a stock directory. The question of if these belong > under a shared parent directory (ie: jslibs) or under the exec/mods > directory is an open question. > - Some way of specifying an initial list (in the ini file) > > You would end up then with something like this: > jslibs/ > std/ > sbbs/ > ars_defs.js > nodedefs.js > sbbsdefs.js > sockdefs.js > uifcdefs.js > irc/ > irc-default.js > irclib.js > ircd/ > ircd_channel.js > ircd_server.js > ircd_unreg.js > ircd_user.js > mods/ > irc/ > irc-cyan.js > Etc. > > This change would impact all JS files, but with reasonable defaults, the impact > could be mitigated. > > Comments? > > --- > Synchronet - Jump on the Web 0.2 bandwagon! > > --- > þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!) i think that the problem is the absolute path i want to load("pepe.js") and this will earch in the actual path not from exec directory but, yes,, i agree to better order to the exec directory --- þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar .