             """, filename
         try
           func module, filename
-        aliasIdMap = toDict([alias, pathToId path] for alias, path of module.__required)
-        everything += boil pathToId(filename), aliasIdMap, code, filename
+        #  console.log "loaded #{config.path}:#{filename} is loading #{deps}"
+        #catch error
+        #  console.log 'error in '+filename+': '+error
+
+        if not config.excluded
+          #  console.log "boiling #{config.path}:#{filename}"
+          pathIdMap = toDict([path, filenameToId fn] for path, fn of deps)
+          everything += boil filenameToId(filename), pathIdMap, code, filename
+        #else
+        #  console.log 'excluded '+filename
+        config = config.parent if config.parent
         updateExtensions()
 
 updateExtensions()


everything = ''
hookedExts = []

updateExtensions = ->
  for ext, func of require.extensions when ext not in hookedExts

path_ = require 'path'
fs = require 'fs'
file = path_.resolve process.argv[2]
filenameIdMap = {}
id = 0
shalow = (from, to) ->
  to[key] = value for key, value of from
  to
filenameToId = (filename) ->
  filenameIdMap[filename] = id+=1 if filename not of filenameIdMap
  filenameIdMap[filename]
toDict = (kvps) ->
  dict = {}
  dict[kvp[0]] = kvp[1] for kvp in kvps
  dict
isExcluded = (config) ->
  if config.excluded or config.path in config.exclude
    yes
  else
    no
boil = (id, pathIdMap, code, filename) ->
  """
  register.call(this,#{id},#{JSON.stringify pathIdMap},
  function(require,exports,module){
  // file: #{path_.relative __dirname, filename}
  #{code}
  });
  """
