Comparing version 1.2.0 to 1.3.0
@@ -5,3 +5,3 @@ { | ||
"description": "Jade template runtime", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "template" |
@@ -64,5 +64,7 @@ 'use strict'; | ||
var mixin = this.mixins[mixinNames[i]]; | ||
for (var x = 0; x < mixin.length; x++) { | ||
for (var y = mixin[x].start; y < mixin[x].end; y++) { | ||
this.buf[y] = ''; | ||
if (!mixin.used) { | ||
for (var x = 0; x < mixin.instances.length; x++) { | ||
for (var y = mixin.instances[x].start; y < mixin.instances[x].end; y++) { | ||
this.buf[y] = ''; | ||
} | ||
} | ||
@@ -344,9 +346,5 @@ } | ||
this.mixins[key] = this.mixins[key] || {used: false, instances: []}; | ||
if (mixin.call) { | ||
if (this.mixins[key]) { | ||
// clear list of mixins with this key so they are not removed | ||
this.mixins[key] = []; | ||
} else { | ||
// todo: throw error for calling a mixin that's not defined | ||
} | ||
this.mixins[key].used = true; | ||
if (pp) this.buf.push("jade_indent.push('" + Array(this.indents + 1).join(' ') + "');") | ||
@@ -405,4 +403,3 @@ if (block || attrs.length || attrsBlocks.length) { | ||
var mixin_end = this.buf.length; | ||
this.mixins[key] = this.mixins[key] || []; | ||
this.mixins[key].push({start: mixin_start, end: mixin_end}); | ||
this.mixins[key].instances.push({start: mixin_start, end: mixin_end}); | ||
} | ||
@@ -409,0 +406,0 @@ }, |
@@ -103,3 +103,3 @@ 'use strict'; | ||
var globals = options.globals && Array.isArray(options.globals) ? options.globals : []; | ||
var globals = []; | ||
@@ -106,0 +106,0 @@ globals.push('jade'); |
@@ -52,2 +52,5 @@ 'use strict'; | ||
Attrs.prototype.removeAttribute = function(name){ | ||
var err = new Error('attrs.removeAttribute is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
for (var i = 0, len = this.attrs.length; i < len; ++i) { | ||
@@ -69,2 +72,5 @@ if (this.attrs[i] && this.attrs[i].name == name) { | ||
Attrs.prototype.getAttribute = function(name){ | ||
var err = new Error('attrs.getAttribute is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
for (var i = 0, len = this.attrs.length; i < len; ++i) { | ||
@@ -71,0 +77,0 @@ if (this.attrs[i] && this.attrs[i].name == name) { |
@@ -38,2 +38,5 @@ 'use strict'; | ||
Block.prototype.replace = function(other){ | ||
var err = new Error('block.replace is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
other.nodes = this.nodes; | ||
@@ -43,3 +46,3 @@ }; | ||
/** | ||
* Pust the given `node`. | ||
* Push the given `node`. | ||
* | ||
@@ -109,2 +112,5 @@ * @param {Node} node | ||
Block.prototype.clone = function(){ | ||
var err = new Error('block.clone is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
var clone = new Block; | ||
@@ -111,0 +117,0 @@ for (var i = 0, len = this.nodes.length; i < len; ++i) { |
@@ -13,2 +13,4 @@ 'use strict'; | ||
Node.prototype.clone = function(){ | ||
var err = new Error('node.clone is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
return this; | ||
@@ -15,0 +17,0 @@ }; |
@@ -35,2 +35,5 @@ 'use strict'; | ||
Tag.prototype.clone = function(){ | ||
var err = new Error('tag.clone is deprecated and will be removed in v2.0.0'); | ||
console.warn(err.stack); | ||
var clone = new Tag(this.name, this.block.clone()); | ||
@@ -37,0 +40,0 @@ clone.line = this.line; |
@@ -13,4 +13,3 @@ 'use strict'; | ||
var Text = module.exports = function Text(line) { | ||
this.val = ''; | ||
if ('string' == typeof line) this.val = line; | ||
this.val = line; | ||
}; | ||
@@ -17,0 +16,0 @@ |
@@ -741,3 +741,3 @@ 'use strict'; | ||
if (seenAttrs) { | ||
console.warn('You should not have jade tags with multiple attributes.'); | ||
console.warn(this.filename + ', line ' + this.peek().line + ':\nYou should not have jade tags with multiple attributes.'); | ||
} | ||
@@ -744,0 +744,0 @@ seenAttrs = true; |
{ | ||
"name": "jade", | ||
"description": "Jade template engine", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"monocle": "1.1.51", | ||
"with": "~2.0.0", | ||
"with": "~3.0.0", | ||
"constantinople": "~2.0.0" | ||
@@ -22,0 +22,0 @@ }, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
997016
25442
+ Addedwith@3.0.1(transitive)
- Removeduglify-js@2.4.0(transitive)
- Removedwith@2.0.0(transitive)
Updatedwith@~3.0.0