   constructor: ->
     super
     @objects = []
-    @execs = []
 
 
 

  constructor: (@settings) ->
    @production = @settings.production
    @settings.urlRoot ?= "/pile/"



    @piles =
      global: new @Type "global", @production, @settings.urlRoot

  setDynamicHelper: (app) ->
    app.dynamicHelpers renderScriptTags: (req, res) => =>
      bundle = @renderTags.apply this, arguments
      inline = ""

      if res._responseObs
        for ob in res._responseObs
          inline += toGlobals ob

      if res._responseFns
        for fn in res._responseFns
          inline += executableFrom fn

      bundle + wrapInScriptTagInline inline

  setMiddleware: (app) ->
    responseExec = (fn) ->
      # "this" is the response object
      this._responseFns.push fn

    responseOb = (ob) ->
      this._responseObs.push ob

    # Middleware that adds add & exec methods to response objects.
    app.use (req, res, next) ->
      res._responseFns ?= []
      res._responseObs ?= []

      # TODO: deprecate res.exec
      res.exec = res.addExec = responseExec
      res.addOb = responseOb

      next()

class CSSManager extends PileManager
