email-templates
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -153,3 +153,2 @@ // node-email-templates | ||
} | ||
//that.render(locals, callback); | ||
}; | ||
@@ -156,0 +155,0 @@ |
@@ -30,2 +30,3 @@ /** | ||
'.sass' : renderSass, | ||
'.scss' : renderSass, | ||
// Handle plain CSS also | ||
@@ -90,2 +91,2 @@ '.css' : renderDefault, | ||
cb(null, source) | ||
} | ||
} |
{ | ||
"name": "email-templates", | ||
"description": "Node.js module for rendering beautiful emails with ejs, jade, swig, hbs, or handlebars templates and email-friendly inline CSS using juice.", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"author": "Nick Baugh <niftylettuce@gmail.com>", | ||
@@ -45,3 +45,3 @@ "contributors": [ | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": "0.8.x | 0.10.x" | ||
}, | ||
@@ -71,6 +71,9 @@ "main": "lib/main.js", | ||
"mocha": "~1.17.1", | ||
"chai": "^1.9.0", | ||
"mkdirp": "^0.3.5", | ||
"rimraf": "^2.2.6" | ||
"chai": "~1.9.0", | ||
"mkdirp": "~0.3.5", | ||
"rimraf": "~2.2.6" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/niftylettuce/node-email-templates/issues/new" | ||
} | ||
} |
@@ -73,2 +73,25 @@ var emailTemplates = require('../lib/main') | ||
}) | ||
it('batch templates', function(done) { | ||
var html = '<h4><%= item%></h4>' | ||
, text = '<%= item%>' | ||
, css = 'h4 { color: #ccc }' | ||
fs.writeFileSync(path.join(templateDir, templateName, 'html.ejs'), html) | ||
fs.writeFileSync(path.join(templateDir, templateName, 'text.ejs'), text) | ||
fs.writeFileSync(path.join(templateDir, templateName, 'style.ejs'), css) | ||
emailTemplates(templateDir, function(err, template) { | ||
template(templateName, true, function(err, batch) { | ||
expect(err).to.be.null | ||
expect(batch).to.be.an.instanceof(Function) | ||
batch({item: 'test'}, templateDir, function(err, html, text) { | ||
expect(err).to.be.null | ||
expect(text).to.equal('test') | ||
expect(html).to.equal( | ||
'<html><body><h4 style=\"color: #ccc;\">test</h4></body></html>') | ||
done() | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) | ||
@@ -75,0 +98,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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
49103
20
757
0
437
1