Socket
Socket
Sign inDemoInstall

email-templates

Package Overview
Dependencies
Maintainers
1
Versions
137
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 0.0.2 to 0.0.4

.jshintrc

20

lib/main.js

@@ -116,8 +116,8 @@ // node-email-templates

async.map([that.text, that.stylesheet], fs.stat, function(err, results) {
async.map([that.text, that.stylesheet], checkExists, function(err, results) {
if (err) return callback(err);
if (!results[0].isFile()) that.text = false;
if (!results[1].isFile()) that.stylesheet = false;
if (!results[0]) that.text = false
if (!results[1]) that.stylesheet = false

@@ -153,2 +153,4 @@ if (that.text && that.stylesheet) {

});
});

@@ -158,2 +160,14 @@ });

});
function checkExists(item, callback) {
function cb(exists) {
return callback(null, exists)
}
// node >= v0.8.x
if (fs.exists) return fs.exists(item, cb)
// other versions of node fallback to path.exists
return path.exists(item, cb)
}
});

@@ -160,0 +174,0 @@ };

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

@@ -25,2 +25,6 @@ , "contributors": [

}
, "devDependencies": {
"nodemailer": "0.3.27"
, "postmark": "0.1.6"
}
}

11

Readme.md
# node-email-templates <sup>0.0.2</sup>
# node-email-templates <sup>0.0.4</sup>
Node.js module for rendering beautiful emails with [ejs][1] templates and email-friendly inline CSS using [juice][2].
**NEW**: Added support for custom EJS options such as opening and closing tags (instead of `<%` and `%>`). See documentation below for more information.
**v0.0.4 (with bug fix for 0.0.3)**:
* Removed requirement for `style.css` and `text.ejs` files with compatibility in `node` v0.6.x to v0.8.x (utilizes `path.exists` vs. `fs.exists` respectively).

@@ -35,5 +36,5 @@ ## Email Templates

4. Add the following files inside the template's folder:
* `html.ejs` - html + [ejs][1] version of your email template
* `text.ejs` - text + [ejs][1] version of your email template
* `style.css` - stylesheet for the template, which will render `html.ejs` with inline CSS (optional)
* `html.ejs` - html + [ejs][1] version of your email template (**required**)
* `text.ejs` - text + [ejs][1] version of your email template (**optional**)
* `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!

@@ -40,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc