Permalink
Browse files

Improved browser and CommonJS compatibility. Cleaned up whitespace.

  • Loading branch information...
1 parent 3f9cc4c commit 6b5610de555b99df93d4aec23cf9b6a633739420 @shannonmoeller shannonmoeller committed May 31, 2012
Showing with 100 additions and 78 deletions.
  1. +9 −1 lib/Jemplate.pm
  2. +91 −77 src/js/kernel.js
View
@@ -402,17 +402,25 @@ sub _preamble {
Copyright 2006-2008 - Ingy döt Net - All rights reserved.
*/
-var Jemplate;
+;(function(){
+
+var root = this,
+ Jemplate;
+
if (typeof(exports) == 'object') {
Jemplate = require("jemplate").Jemplate;
}
+else {
+ Jemplate = root.Jemplate;
+}
if (typeof(Jemplate) == 'undefined')
throw('Jemplate.js must be loaded before any Jemplate template files');
...
}
+}());
1;
=head1 SYNOPSIS
Oops, something went wrong.

0 comments on commit 6b5610d

Please sign in to comment.