 
 everything = ''
 hookedExts = []
+config = exclude:[], path:''
 
 updateExtensions = ->
   for ext, func of require.extensions when ext not in hookedExts

path = require 'path'
fs = require 'fs'
file = path.resolve process.argv[2]
pathIdMap = {}
id = 0
pathToId = (path) ->
  pathIdMap[path] = id+=1 if path not of pathIdMap
  pathIdMap[path]
toDict = (kvps) ->
  dict = {}
  dict[kvp[0]] = kvp[1] for kvp in kvps
  dict
boil = (id, aliasIdMap, code, filename) ->
  """
  // file: #{path.relative __dirname, filename}
  register.call(this,#{id},#{JSON.stringify aliasIdMap},
  function(require,exports,module){
  #{code}
  });
  """

  (function(everything){
    window.boiler={main:{}};
    var idModuleMap={};
    function emulateRequire(pathIdMap){
      function require(path, opt){
        var exports = idModuleMap[pathIdMap[path]];
        if(typeof opt==='function'){
          return opt(exports);
        }else if(typeof opt==='string'){
          return window[opt];
        }else{
          return exports;
        }
      }
      return require;
    }
    function register(id,pathIdMap,factory){
      var module={exports:{}};
      factory.call(this,emulateRequire(pathIdMap),module.exports,module);
      window.boiler.main=idModuleMap[id]=module.exports;
    }
    everything.call(this,register);
