Navigation Menu

Skip to content

Commit

Permalink
Release 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 10, 2011
1 parent 7b15046 commit 7b05f23
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
6 changes: 6 additions & 0 deletions History.md
@@ -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
==================

Expand Down
32 changes: 31 additions & 1 deletion jade.js
Expand Up @@ -714,7 +714,7 @@ var Parser = require('./parser')
* Library version.
*/

exports.version = '0.16.4';
exports.version = '0.17.0';

/**
* Expose self closing tags.
Expand Down Expand Up @@ -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){
Expand Down
3 changes: 2 additions & 1 deletion jade.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/jade.js
Expand Up @@ -21,7 +21,7 @@ var Parser = require('./parser')
* Library version.
*/

exports.version = '0.16.4';
exports.version = '0.17.0';

/**
* Expose self closing tags.
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -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",
Expand Down

0 comments on commit 7b05f23

Please sign in to comment.