I'd like to use some CommonJS
compliant modules in some of my scripts. Those scripts are just meant to do things on my laptop: it's not in the browser, it's not really in the server either. I just manipulate a mongodb
that I use locally.
So I wonder, what is the best way to do that? I only found outdated wrappers that would provide CommonJS capabilities and the mongo shell.
Should I handcode a require
system? Should I handcode a workaround? Is there already a minimal loader existing?
All your ideas regarding the matter will be appreciated, for sure.
Pointers towards implementation of other parts of CommonJS would be appreciated too.
@Mog
You should try out http://code.google.com/p/gpsee/ which is having general-purpose C API for embedding SpiderMonkey & CommonJS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With