Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created July 21, 2010 16:26
Show Gist options
  • Select an option

  • Save ELLIOTTCABLE/484716 to your computer and use it in GitHub Desktop.

Select an option

Save ELLIOTTCABLE/484716 to your computer and use it in GitHub Desktop.
constructCompiler = function(resolver){ return function(pathBit, _){
resolver(pathBit, function(e, pathBit){ if(e)return _(e)
fs.readFile(pathBit, function(e, source){ if(e)return _(e)
_(undefined, compileScript(source), pathBit) }) }) }}
constructRunner = function(compiler){ return function(pathBit, exports, _){
compiler(pathBit, function(e, script, pathBit){ if(e)return _(e)
_(undefined, runScript(script, pathBit, exports)) }) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment