Subj : load() search paths... To : All From : Deuce Date : Wed Aug 05 2009 04:22 pm 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!) .