hamlbars 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -0
- data/lib/hamlbars/version.rb +1 -1
- metadata +65 -77
- data/vendor/javascripts/handlebars.js +0 -1610
- data/vendor/javascripts/precompiler.js +0 -33
@@ -1,33 +0,0 @@
|
|
1
|
-
// DOM
|
2
|
-
var Element = {}
|
3
|
-
Element.firstChild = function () { return Element };
|
4
|
-
Element.innerHTML = function () { return Element };
|
5
|
-
|
6
|
-
var document = { createRange: false, createElement: function() { return Element } };
|
7
|
-
var window = this;
|
8
|
-
this.document = document;
|
9
|
-
|
10
|
-
// Console
|
11
|
-
var console = window.console = {};
|
12
|
-
console.log = console.info = console.warn = console.error = function(){};
|
13
|
-
|
14
|
-
// jQuery
|
15
|
-
var jQuery = window.jQuery = function() { return jQuery };
|
16
|
-
jQuery.ready = function() { return jQuery };
|
17
|
-
jQuery.inArray = function() { return jQuery };
|
18
|
-
jQuery.jquery = "1.7";
|
19
|
-
var $ = jQuery;
|
20
|
-
|
21
|
-
// Precompiler
|
22
|
-
var Hamlbars = {
|
23
|
-
precompile: function(string) {
|
24
|
-
var ast = Handlebars.parse(string);
|
25
|
-
var options = { data: true, stringParams: true };
|
26
|
-
var environment = new Handlebars.Compiler().compile(ast, options);
|
27
|
-
var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
|
28
|
-
|
29
|
-
return templateSpec.toString();
|
30
|
-
}
|
31
|
-
};
|
32
|
-
|
33
|
-
|