<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -354,3 +354,33 @@ function d(msg) {
     arguments.callee.printFn(output);
 }
 d.on = false;
+
+
+// ENVIRONMENT-SPECIFIC: HELMA
+// ----------------------------------------------------------------------
+
+if(typeof(export) === 'function') {
+
+    include('helma/file');
+    import('helma/webapp/response');
+
+    export('render', 'Response');
+
+    function render(templateName, env) {
+        // This should eventually be cached and only recompiled if
+        // file changes.
+
+        var template =
+            seethrough.compile(
+                new XML(
+                    new File(
+                        getResource(templateName + '.st'))
+                        .readAll())
+            );
+        return template(env);
+    }
+
+    function Response(template, env) {
+        return new helma.webapp.response.Response(render(template, env));
+    }
+}</diff>
      <filename>seethrough.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4b32f3077282357186064486e986d38a2cdc44dc</id>
    </parent>
  </parents>
  <author>
    <name>Massimiliano Mirra</name>
    <email>bard@hyperstruct.net</email>
  </author>
  <url>http://github.com/bard/seethrough_js/commit/820440e66fbe66f6ad36d097b7269a18b815c418</url>
  <id>820440e66fbe66f6ad36d097b7269a18b815c418</id>
  <committed-date>2009-08-13T06:35:44-07:00</committed-date>
  <authored-date>2009-08-13T06:35:44-07:00</authored-date>
  <message>Add conditional Helma-specific exports.</message>
  <tree>afde117288275b52e1173824f5120081903c09dd</tree>
  <committer>
    <name>Massimiliano Mirra</name>
    <email>bard@hyperstruct.net</email>
  </committer>
</commit>
