TylerBrock/mongo-hacker — pull request #32 by bjori (2013-01-22 23:04:39+00:00)
Title: Update README with modularisation recommendation & make syntax highlighting configurable

Recommend using a specific directory structure;
~/.mongorc.js/
config.js
init.js
my.js

The shell will read everything in the ~/.mongorc.js/ folder alphabetically so we "accidentally" achieve modularisation and can use logical filenames.

Also update the syntax highlighting to be configurable from config.js, essentially just meant as a proof-of-concept - but I guess thats what most people would want to configure anyway :P

Note: We can initialise the variables to empty at the top of "mongo_hacker.js" as that would overwrite the definitions from "config.js".. so we need to try/catch them all..
A little annoying and ugly, but couldn't think of a better way.