Socket
Socket
Sign inDemoInstall

email-templates

Package Overview
Dependencies
Maintainers
2
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.1.6 to 0.1.7

.travis.yml

1

lib/main.js

@@ -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 @@

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