Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

email-templates

Package Overview
Dependencies
Maintainers
3
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 1.2.1 to 1.3.0

3

CHANGELOG.md

@@ -17,2 +17,5 @@ [antoinepairet]: https://github.com/antoinepairet

## 1.3.0 (2015-05-22)
* development: [@andybrown](https://github.com/astephenb) Supports node-sass 3.0
## 1.2.1 (2015-03-18)

@@ -19,0 +22,0 @@ * enhancement: [@kingcody][kingcody] Supports less 2.0

26

lib/templateManager.js

@@ -14,3 +14,3 @@ /**

'.jade' : cons.jade.render,
'.ejs' : renderEjs,
'.ejs' : cons.ejs.render,
'.swig' : cons.swig.render,

@@ -52,13 +52,2 @@ '.hbs' : cons.handlebars.render,

function renderEjs(source, options, cb) {
var ejs = require('ejs')
try {
var tmpl = ejs.compile(source, options)
cb(null, tmpl(options))
} catch (err) {
console.error(err.stack)
cb(err)
}
}
// CSS pre-processors

@@ -94,11 +83,16 @@ function renderLess(source, locals, cb) {

// Result handlers required by sass.
// Result handlers required by node-sass < 3.0.0.
function errorHandler(err) { cb(err) }
function successHandler(data) { cb(null, data.css)}
locals.success = successHandler
locals.error = errorHandler
locals.data = source
locals.includePaths = [locals.templatePath];
locals.success = successHandler
locals.error = errorHandler
sass.render(locals)
sass.render(locals, function(err, result) {
if (err) { return cb(err); }
cb(null, result.css.toString());
});
}

@@ -105,0 +99,0 @@

{
"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": "1.2.1",
"version": "1.3.0",
"author": "Nick Baugh <niftylettuce@gmail.com>",

@@ -81,3 +81,3 @@ "contributors": [

"styl": "^0.2.7",
"node-sass": "^2.0.1",
"node-sass": "^3.1.1",
"sinon": "^1.10.2",

@@ -84,0 +84,0 @@ "sinon-chai": "^2.7.0",

@@ -100,3 +100,3 @@

- `styl@^0.2.7`
- `node-sass@^0.9.3`
- `node-sass@^3.1.1`

@@ -103,0 +103,0 @@ ```bash

Sorry, the diff of this file is not supported yet

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