       scriptURLs.unshift url for url in obj.reverse()
     else
       scriptURLs.unshift obj
-    
+
 
 
   # Run when app starts listening a port


      return compiledTags = tags.join "\n"


    # We will allow usage of production.js only in production mode 
    runOnListen.push ->
      for script in clientScriptsFs
        script = "#{ scriptDir }/#{ script }"
        console.log "compile #{ script }"
        if script.match /\.js$/
          productionClientCode +=  fs.readFileSync(script).toString()
        else if script.match /\.coffee$/
          productionClientCode += coffeescript.compile fs.readFileSync(script).toString()

      productionClientCode += compiledEmbeddedCode
      productionClientCode = minify productionClientCode


    # All js code will be shared from here in production
    app.get "/managedjs/production.js", (req, res) ->
      # TODO: Set cache time to forever. Timestamps will kill the cache when
      # required.
      res.send productionClientCode, 'Content-Type': 'application/javascript'



  # Dynamic helper for templates. bundleJavascript will return all required

             , ('Content-Type': 'text/plain'), 404



  # Extends Express server object with function that will share given Javascript
  # object with browser. Will work for functions too, but be sure that you will
  # use only pure functions. Scope or context will not be same in the browser.
