Comparing version 0.1.6 to 0.1.7
18
index.js
@@ -11,2 +11,3 @@ 'use strict'; | ||
* @constructor | ||
* @param {Object} options Temper configuration. | ||
* @api public | ||
@@ -40,5 +41,5 @@ */ | ||
'.mustache': ['hogan.js', 'mustache', 'handlebars'], | ||
'.hbs': [ 'handlebars' ], | ||
'.handlebars': [ 'handlebars' ], | ||
'.html': [ 'html' ] | ||
'.hbs': ['handlebars'], | ||
'.handlebars': ['handlebars'], | ||
'.html': ['html'] | ||
}; | ||
@@ -266,3 +267,5 @@ | ||
case 'jade': | ||
server = compiler.compile(template); | ||
server = compiler.compile(template, { | ||
filename: filename // Required for includes and used for debugging. | ||
}); | ||
@@ -277,3 +280,3 @@ // | ||
compileDebug: false, // No debug code plx. | ||
filename: filename // Used for debugging. | ||
filename: filename // Required for includes and used for debugging. | ||
}).toString().replace('function anonymous', 'function ' + name); | ||
@@ -286,3 +289,6 @@ | ||
case 'html': | ||
engine = 'html'; | ||
// | ||
// We need to JSON.stringify the template to prevent it from throwing | ||
// errors. | ||
// | ||
client = (new Function( | ||
@@ -289,0 +295,0 @@ 'return '+ JSON.stringify(template) |
{ | ||
"name": "temper", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Temper compiles template for client and server side usage.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,7 +11,8 @@ # Temper | ||
- jade, automatically discovered by using the `.jade` extension. | ||
- ejs, automatically discovered by using the `.ejs` extension. | ||
- hogan.js, automatically discovered by using the `.mustache` extension. | ||
- mustache, automatically discovered by using the `.mustache` extension. | ||
- handlebars, automatically discovered by using the `.mustache` extension. | ||
- **jade**, automatically discovered by using the `.jade` extension. | ||
- **ejs**, automatically discovered by using the `.ejs` extension. | ||
- **hogan.js**, automatically discovered by using the `.mustache` extension. | ||
- **mustache**, automatically discovered by using the `.mustache` extension. | ||
- **handlebars**, automatically discovered by using the `.mustache` extension. | ||
- **html**, automatically discovered by using the `.html` extension. | ||
@@ -18,0 +19,0 @@ As you can see from the list above, we support multiple version engines for the |
19959
390
128