tripartite
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -6,5 +6,14 @@ var through = require('through2'); | ||
var fileName = file.toString() | ||
if (/\.tri$/.test(fileName)) { | ||
var templateName = fileName.substring(0, fileName.length - 4) | ||
var processable = false | ||
var templateName | ||
if (/\.tri$/.test(fileName)) { | ||
templateName = fileName.substring(0, fileName.length - 4) | ||
processable = true | ||
} | ||
if (/\.body$/.test(fileName)) { | ||
templateName = fileName.substring(0, fileName.length - 5) | ||
processable = true | ||
} | ||
if(processable) { | ||
if(__dirname.indexOf('node_modules') > -1) { | ||
@@ -11,0 +20,0 @@ var start = __dirname.substring(0, __dirname.indexOf('node_modules')) |
{ | ||
"name": "tripartite", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A simple and fast javascript templating library", | ||
@@ -5,0 +5,0 @@ "main": "tripartite.js", |
@@ -42,2 +42,6 @@ | ||
t.prototype.getTemplate = function(name) { | ||
return this.templates[name] | ||
} | ||
t.prototype.parseTemplateScript = function(tx) { | ||
@@ -146,3 +150,3 @@ var tks = this.tts(tx); | ||
for(var i = 0; i < this.ed.length; i++) { | ||
r += this.tripartite.templates[at](this.ed[i]); | ||
r += this.getTemplate(at)(this.ed[i]); | ||
} | ||
@@ -152,3 +156,3 @@ return r; | ||
else { | ||
return this.tripartite.templates[at](this.ed); | ||
return this.getTemplate(at)(this.ed); | ||
} | ||
@@ -159,2 +163,6 @@ } | ||
ae.prototype.getTemplate = function(name) { | ||
return this.tripartite.getTemplate(name) | ||
} | ||
/* evaluate data selector expression */ | ||
@@ -161,0 +169,0 @@ ae.prototype.edse = function(cc) { |
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
9128
339