 
 
 class BasePile
+  urlRoot: "/pile/"
 
   production: false
 

asCodeOb = do ->
  getId = ->
    sum = crypto.createHash('sha1')
    if @type is "file"
      sum.update @filePath
    else
      sum.update OB.stringify @

    hash = sum.digest('hex').substring 10, 0

    sum.update @rawPile
    @pileHash = sum.digest('hex')


  pileUp: (cb) ->

    async.map @code, (codeOb, cb) =>
      codeOb.getCode (err, code) =>
        return cb? err if err #                                           TODO: minifying here does not work!?
        cb null, @commentLine("#{ codeOb.type }: #{ codeOb.getId() }") + "\n#{ code }"

    , (err, result) =>
