You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

email-templates

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-templates - npm Package Compare versions

Comparing version

to
0.0.7

examples/templates/footer/html.ejs

8

lib/main.js

@@ -34,3 +34,3 @@ // node-email-templates

this.bufferType = ''
this.render = function(locals, html, text, stylesheet, bufferType, callback) {
this.render = function(locals, templatePath, html, text, stylesheet, bufferType, callback) {
// Check if `bufferType` is a function (callback), or string

@@ -63,3 +63,5 @@ var isBuffer = false

locals = _.defaults(locals, (typeof defaults === 'object') ? defaults : {});
locals.filename = path.join(templatePath, 'html.ejs');
html = ejs.render(html, locals);
locals.filename = path.join(templatePath, 'text.ejs');
text = (text) ? ejs.render(text, locals) : '';

@@ -133,5 +135,5 @@ if (stylesheet) html = juice(html, stylesheet);

if (isBuffer) {
that.render(locals, null, null, null, bufferType, callback)
that.render(locals, templatePath, null, null, null, bufferType, callback)
} else {
that.render(locals, null, null, null, callback)
that.render(locals, templatePath, null, null, null, callback)
}

@@ -138,0 +140,0 @@ //that.render(locals, callback);

{
"name": "email-templates"
, "description": "Node.js module for rendering beautiful emails with ejs templates and email-friendly inline CSS using juice."
, "version": "0.0.6"
, "version": "0.0.7"
, "author": "Nick Baugh <niftylettuce@gmail.com>"

@@ -9,2 +9,3 @@ , "contributors": [

, { "name": "Andrea Baccega", "email": "vekexasia@gmail.com" }
, { "name": "Nic Jansma", "web": "http://nicj.net" }
]

@@ -22,3 +23,3 @@ , "keywords": [ "node-email-templates", "ejs", "email", "templates", "email-templates", "juice", "inline", "css" ]

, "dependencies": {
"ejs": "0.7.1"
"ejs": "0.8.3"
, "juice": "https://github.com/niftylettuce/juice/tarball/master"

@@ -25,0 +26,0 @@ , "async": "0.1.22"

# node-email-templates <sup>0.0.6</sup>
# node-email-templates <sup>0.0.7</sup>
Node.js module for rendering beautiful emails with [ejs][1] templates and email-friendly inline CSS using [juice][2].
**v0.0.7**:
* Added support for ejs's `include` directive thanks to @nicjansma
**v0.0.6**:

@@ -55,3 +58,4 @@ * Fixed batch problem (`...has no method slice`) thanks to @vekexasia

* `style.css` - stylesheet for the template, which will render `html.ejs` with inline CSS (**optional**)
5. Utilize one of the examples below for your respective email module and start sending beautiful emails!
5. You may use the `include` directive from ejs (for example, to include a common header or footer). See the `/examples` folder for details.
6. Utilize one of the examples below for your respective email module and start sending beautiful emails!

@@ -370,2 +374,3 @@

* Andrea Baccega <vekexasia@gmail.com>
* Nic Jansma (http://nicj.net)

@@ -372,0 +377,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

Sorry, the diff of this file is not supported yet