     update: ->
 
 
+B.defineAction "ui.html.jade", 
+  doc: "Compiles a template using the Jade template engine"
+  parameterDefs:
+    template: 
+      type: B.String
+      constant: true
+    output: B.String # shorthand syntax
+    locals: B.Object({}) # shorthand syntax
 
+  action: (temp, params) ->
+    init: -> 
+      jade = require("jade")
+      temp.compiledTemplate = jade.compile(params.template.value)
+    destroy: ->
+    update: -> 
+      # in case params don't change, do nothing
+      if not params.locals.value.hasChanged then return 
+
+      params.output.value = temp.compiledTemplate(params.locals.value)
+


# Q: How to "package" things like the loading screen together?

B.declareActions [
  B.doInSequence [
    "init page": ui.html.show 
      location: "body"
      html: B.asset("baseTemplate") 

          ]
      ]
  ]


B.declareModels
  status: new B.Object
