Comparing version 0.1.2 to 0.2.0
@@ -75,4 +75,5 @@ /*global module, require, console*/ | ||
return Object.defineProperty(new Samson(), 'Samson', {value : Samson}); | ||
}( | ||
require('./Samson') | ||
)); |
@@ -136,2 +136,3 @@ /*global module, require, console*/ | ||
return Object.freeze(Queue); | ||
}()); |
@@ -27,6 +27,7 @@ /*global module, require, console*/ | ||
function prepareData(mimeType, file, data) { | ||
var index, | ||
tpl = this.tpls[file], | ||
tagStart = tpl.settings.tagStart; | ||
var index, tpl, tagStart; | ||
tpl = this.tpls[file]; | ||
tagStart = tpl.settings.tagStart; | ||
// If we don't match the mimeType then we skip processing | ||
@@ -126,5 +127,5 @@ if (!mimeparse.bestMatch(ResourceProcessor.mimePatterns, mimeType)) { | ||
value : function apply(mimeType, file, data, def, vars) { | ||
var i, l, keys, descriptor, | ||
tpl = this.getActiveTpl(file); | ||
var i, l, keys, descriptor, tpl; | ||
tpl = this.getActiveTpl(file); | ||
if (null === tpl) { | ||
@@ -340,2 +341,3 @@ // def property descriptor | ||
})); | ||
}( | ||
@@ -342,0 +344,0 @@ require('path'), |
@@ -15,3 +15,3 @@ /*global module, require, console*/ | ||
*/ | ||
module.exports = (function (path, EventEmitter, ReadStream, Glob, mimeMagic, Queue) { | ||
module.exports = (function (path, Super, ReadStream, Glob, mimeMagic, Queue) { | ||
"use strict"; | ||
@@ -359,3 +359,3 @@ | ||
// callSuper | ||
EventEmitter.call(this); | ||
Super.call(this); | ||
// Define instance Object references | ||
@@ -395,3 +395,3 @@ Object.defineProperties(this, /** @lends ResourceReader# */ { | ||
// Instance properties | ||
ResourceReader.prototype = Object.freeze(Object.create(EventEmitter.prototype, /** @lends ResourceReader# */ { | ||
ResourceReader.prototype = Object.freeze(Object.create(Super.prototype, /** @lends ResourceReader# */ { | ||
/** @ignore */ | ||
@@ -581,2 +581,3 @@ constructor : {value : ResourceReader}, | ||
})); | ||
}( | ||
@@ -583,0 +584,0 @@ require('path'), |
@@ -14,3 +14,3 @@ /*global module, require, console, setTimeout, clearTimeout*/ | ||
*/ | ||
module.exports = (function (path, EventEmitter, WriteStream, mkdirp, Queue) { | ||
module.exports = (function (path, Super, WriteStream, mkdirp, Queue) { | ||
"use strict"; | ||
@@ -245,3 +245,3 @@ | ||
// callSuper | ||
EventEmitter.call(this); | ||
Super.call(this); | ||
// Define instance Object references | ||
@@ -289,3 +289,3 @@ Object.defineProperties(this, /** @lends ResourceWriter# */ { | ||
// Instance properties | ||
ResourceWriter.prototype = Object.freeze(Object.create(EventEmitter.prototype, /** @lends ResourceWriter# */ { | ||
ResourceWriter.prototype = Object.freeze(Object.create(Super.prototype, /** @lends ResourceWriter# */ { | ||
/** @ignore */ | ||
@@ -505,3 +505,4 @@ constructor : {value : ResourceWriter}, | ||
event : {value : event} | ||
});; | ||
}); | ||
}( | ||
@@ -508,0 +509,0 @@ require('path'), |
@@ -15,3 +15,3 @@ /*global module, require, process, console*/ | ||
*/ | ||
module.exports = (function (path, fs, EventEmitter, ResourceReader, ResourceWriter, ResourceProcessor) { | ||
module.exports = (function (path, fs, Super, ResourceReader, ResourceWriter, ResourceProcessor) { | ||
"use strict"; | ||
@@ -254,3 +254,3 @@ | ||
// callSuper | ||
EventEmitter.call(this); | ||
Super.call(this); | ||
@@ -320,3 +320,3 @@ // Enum | ||
// Instance properties | ||
Samson.prototype = Object.freeze(Object.create(EventEmitter.prototype, /** @lends Samson# */ { | ||
Samson.prototype = Object.freeze(Object.create(Super.prototype, /** @lends Samson# */ { | ||
/** @ignore */ | ||
@@ -477,2 +477,3 @@ constructor : {value : Samson}, | ||
})); | ||
}( | ||
@@ -479,0 +480,0 @@ require('path'), |
@@ -27,13 +27,13 @@ /*global module, require, console*/ | ||
* @type {TemplateSettings} | ||
* @default new TemplateSettings('#{build{', '}}#') | ||
* @default new TemplateSettings('#{', '}#') | ||
* @since 1.0 | ||
*/ | ||
txt : new TemplateSettings('#{build{', '}}#'), | ||
txt : new TemplateSettings('#{', '}#'), | ||
/** | ||
* Settings specific for the HTML multiline comment format. | ||
* @type {TemplateSettings} | ||
* @default new TemplateSettings('<!--{build{', '}}-->') | ||
* @default new TemplateSettings('<!--{', '}-->') | ||
* @since 1.0 | ||
*/ | ||
html : new TemplateSettings('<!--{build{', '}}-->'), | ||
html : new TemplateSettings('<!--{', '}-->'), | ||
/** | ||
@@ -43,6 +43,6 @@ * Settings specific for the JavaScript multiline comment format. | ||
* @type {TemplateSettings} | ||
* @default new TemplateSettings('/\u002A{build{', '}}\u002A/') | ||
* @default new TemplateSettings('/\u002A{', '}\u002A/') | ||
* @since 1.0 | ||
*/ | ||
js : new TemplateSettings('/\u002A{build{', '}}\u002A/') | ||
js : new TemplateSettings('/\u002A{', '}\u002A/') | ||
}; | ||
@@ -240,2 +240,3 @@ | ||
})); | ||
}( | ||
@@ -242,0 +243,0 @@ require('dot'), |
@@ -278,7 +278,8 @@ /*global module, require, console*/ | ||
value : function validate(data) { | ||
var tagStart = this.tagStart, | ||
tagEnd = this.tagEnd, | ||
len = data.length, | ||
total, index, broken, diff; | ||
var tagStart, tagEnd, len, total, index, broken, diff; | ||
tagStart = this.tagStart; | ||
tagEnd = this.tagEnd; | ||
len = data.length; | ||
// Make sure we are working with a string | ||
@@ -289,3 +290,3 @@ if (data && 'string' !== typeof data.valueOf()) { | ||
if (data.length > tagStart.length) { | ||
if (len > tagStart.length) { | ||
// Check for a broken conditional. | ||
@@ -335,3 +336,3 @@ // First match all conditionals, start and end. | ||
// Check data length otherwise charAt may result in a false positive. | ||
while (broken && index < data.length) { | ||
while (broken && index < len) { | ||
broken = data.charAt(index) === tagStart.charAt(diff - (len - index)); | ||
@@ -372,4 +373,5 @@ index++; | ||
})); | ||
}( | ||
require('dot') | ||
)); |
@@ -10,3 +10,3 @@ { | ||
"description": "A very useful build step; read any number of files, process them as JavaScript templates, and save output to another destination.", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"repository": { | ||
@@ -24,7 +24,7 @@ "type": "git", | ||
"dependencies": { | ||
"dot": "0.2.4", | ||
"glob": "3.1.9", | ||
"dot": "0.2.5", | ||
"glob": "3.1.10", | ||
"mime-magic": ">=0.2.6", | ||
"mimeparse": ">=0.1.4", | ||
"mkdirp": ">=0.3.2", | ||
"mkdirp": ">=0.3.3", | ||
"optimist": "0.3.4" | ||
@@ -31,0 +31,0 @@ }, |
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
99778
12
2740
+ Addeddot@0.2.5(transitive)
+ Addedglob@3.1.10(transitive)
- Removeddot@0.2.4(transitive)
- Removedglob@3.1.9(transitive)
Updateddot@0.2.5
Updatedglob@3.1.10
Updatedmkdirp@>=0.3.3