🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

jade

Package Overview
Dependencies
Maintainers
0
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade - npm Package Compare versions

Comparing version

to
0.9.0

jade.js

5

History.md
0.9.0 / 2011-03-16
==================
* Added client-side browser support via `make jade.js` and `make jade.min.js`.
0.8.9 / 2011-03-15

@@ -3,0 +8,0 @@ ==================

18

lib/compiler.js

@@ -105,4 +105,5 @@

visitBlock: function(block){
for (var i = 0, len = block.length; i < len; ++i) {
this.visit(block[i]);
var len = len = block.nodes.length;
for (var i = 0; i < len; ++i) {
this.visit(block.nodes[i]);
}

@@ -156,3 +157,3 @@ },

if (tag.code) this.visitCode(tag.code);
if (tag.text) this.buffer(utils.text(tag.text[0].trimLeft()));
if (tag.text) this.buffer(utils.text(tag.text.nodes[0].trimLeft()));
this.escape = 'pre' == tag.name;

@@ -177,3 +178,3 @@ this.visit(tag.block);

} else {
this.buffer(fn(utils.text(filter.block.join('')), filter.attrs));
this.buffer(fn(utils.text(filter.block.nodes.join('')), filter.attrs));
}

@@ -190,3 +191,3 @@ },

visitText: function(text){
text = utils.text(text.join(''));
text = utils.text(text.nodes.join(''));
if (this.escape) text = escape(text);

@@ -282,2 +283,5 @@ this.buffer(text);

+ ' for (var ' + each.key + ' in ' + each.obj + ') {\n'
// if browser
+ ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){'
// end
+ ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n');

@@ -287,2 +291,6 @@

// if browser
this.buf.push(' }\n');
// end
this.buf.push(' }\n }\n}).call(this);\n');

@@ -289,0 +297,0 @@ },

@@ -14,3 +14,5 @@

, Compiler = require('./compiler')
// if node
, fs = require('fs');
// end

@@ -21,3 +23,3 @@ /**

exports.version = '0.8.9';
exports.version = '0.9.0';

@@ -24,0 +26,0 @@ /**

@@ -22,2 +22,3 @@

var Block = module.exports = function Block(node){
this.nodes = [];
if (node) this.push(node);

@@ -31,1 +32,13 @@ };

Block.prototype.__proto__ = Node.prototype;
/**
* Pust the given `node`.
*
* @param {Node} node
* @return {Number}
* @api public
*/
Block.prototype.push = function(node){
return this.nodes.push(node);
};

@@ -14,8 +14,2 @@

var Node = module.exports = function Node(){};
/**
* Inherit from `Array`.
*/
Node.prototype.__proto__ = Array.prototype;
var Node = module.exports = function Node(){};

@@ -30,2 +30,8 @@

/**
* Inherit from `Node`.
*/
Tag.prototype.__proto__ = Node.prototype;
/**
* Set attribute `name` to `val`, keep in mind these become

@@ -76,7 +82,1 @@ * part of a raw js object literal, so to quote a value you must

};
/**
* Inherit from `Node`.
*/
Tag.prototype.__proto__ = Node.prototype;

@@ -22,2 +22,3 @@

var Text = module.exports = function Text(line) {
this.nodes = [];
if ('string' == typeof line) this.push(line);

@@ -30,2 +31,14 @@ };

Text.prototype.__proto__ = Node.prototype;
Text.prototype.__proto__ = Node.prototype;
/**
* Push the given `node.`
*
* @param {Node} node
* @return {Number}
* @api public
*/
Text.prototype.push = function(node){
return this.nodes.push(node);
};

@@ -415,4 +415,4 @@

if (tag.block) {
for (var i = 0, len = block.length; i < len; ++i) {
tag.block.push(block[i]);
for (var i = 0, len = block.nodes.length; i < len; ++i) {
tag.block.push(block.nodes[i]);
}

@@ -419,0 +419,0 @@ } else {

{
"name": "jade",
"description": "Jade template engine",
"version": "0.8.9",
"version": "0.9.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "main": "./index.js",

@@ -9,3 +9,3 @@

- high performance parser
- client-side support
- great readability

@@ -48,2 +48,12 @@ - flexible indentation

## Browser Support
To compile jade to a single file compatible for client-side use simply execute:
$ make jade.js
Alternatively, if uglifyjs is installed via npm (`npm install uglify-js`) you may execute the following which will create both files.
$ make jade.min.js
## Public API

@@ -50,0 +60,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet