Norman, For now your best bet would probably be to use a preprocessor. I contemplated once adding a thing to read multiple files from the command line instead of just one, but the method used for compiling scripts didn't make that immediately easy so I dropped it when I was investigating.
Adding a load() function doesn't sound like the best method to accomplish this as it'd be another function that could be exploitable by sandboxed client code. I know most of the non-js view servers don't do much if anything to protect against users doing Bad Stuff but having the default engine prevent as much as possible just seems like a good idea. HTH, Paul Davis On Wed, Aug 12, 2009 at 3:08 PM, Norman Barker<[email protected]> wrote: > Hi, > > I have been looking at the SpiderMonkey shell and the custom couchdb > javascript driver and see that the couchdb driver does not allow the > load(filename) function which is allowed in the shell, is this > intentional? > > I am looking to add functions to main.js without having to paste them > into one file and load() would have been a way around this. The > alternative is to implement a pre-processor to create one file before > deployment which I will use for now. > > thanks, > > Norman >
