Permalink
Browse files

Release 0.17.0

  • Loading branch information...
tj committed Nov 10, 2011
1 parent 7b15046 commit 7b05f23f9ed3e15c878d377a0478fc149576e0a1
Showing with 41 additions and 4 deletions.
  1. +6 −0 History.md
  2. +31 −1 jade.js
  3. +2 −1 jade.min.js
  4. +1 −1 lib/jade.js
  5. +1 −1 package.json
View
@@ -1,4 +1,10 @@
+0.17.0 / 2011-11-10
+==================
+
+ * jade.renderFile() is back! (for express 3.x)
+ * Fixed `Object.keys()` failover bug
+
0.16.4 / 2011-10-24
==================
View
32 jade.js
@@ -714,7 +714,7 @@ var Parser = require('./parser')
* Library version.
*/
-exports.version = '0.16.4';
+exports.version = '0.17.0';
/**
* Expose self closing tags.
@@ -896,6 +896,36 @@ exports.render = function(str, options, fn){
fn(err);
}
};
+
+/**
+ * Render a Jade file at the given `path` and callback `fn(err, str)`.
+ *
+ * @param {String} path
+ * @param {Object|Function} options or callback
+ * @param {Function} fn
+ * @api public
+ */
+
+exports.renderFile = function(path, options, fn){
+ var key = path + ':string';
+
+ if ('function' == typeof options) {
+ fn = options, options = {};
+ }
+
+ options.filename = path;
+ var str = options.cache
+ ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8'))
+ : fs.readFileSync(path, 'utf8');
+
+ exports.render(str, options, fn);
+};
+
+/**
+ * Express support.
+ */
+
+exports.__express = exports.renderFile;
}); // module: jade.js
require.register("lexer.js", function(module, exports, require){
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -21,7 +21,7 @@ var Parser = require('./parser')
* Library version.
*/
-exports.version = '0.16.4';
+exports.version = '0.17.0';
/**
* Expose self closing tags.
View
@@ -1,7 +1,7 @@
{
"name": "jade",
"description": "Jade template engine",
- "version": "0.16.4",
+ "version": "0.17.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"repository": "git://github.com/visionmedia/jade",
"main": "./index.js",

0 comments on commit 7b05f23

Please sign in to comment.