 window = {location: {href: "local"}} unless window?
 
 coffee = require "coffee-script"
+
+{logger} = require "./logging"
 
 # add some useful functions to underscore
 require("./custom").monkey_patch()

}

Collections.register_plugin = (plugin, locations) ->
  Collections.register_locations locations, errorFn = (name) ->
    throw new Error("#{name} was already registered, attempted to re-register in #{plugin}")


      errorFn?(name)

Collections.register_model = (name, mod) ->
  logger.info("Registering model: #{name}")

  compile = (code) ->
    body = coffee.compile(code, {bare: true, shiftLine: true})
    new Function("require", "module", "exports", body)
