Comparing version 1.2.1 to 1.2.2
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"licenses": "MIT", | ||
@@ -31,2 +31,3 @@ "keywords": [ | ||
"async": "~0.2.9", | ||
"hermit": "^0.2.2", | ||
"lodash": "~2.4.1", | ||
@@ -33,0 +34,0 @@ "mandrill-api": "~1.0.37", |
![campaign.png][9] ![ga](https://ga-beacon.appspot.com/UA-35043128-6/campaign/readme?pixel) | ||
[![help me on gittip](http://gbindex.ssokolow.com/img/gittip-43x20.png)](https://www.gittip.com/bevacqua/) [![flattr.png](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=nzgb&url=https%3A%2F%2Fgithub.com%2Fbevacqua%2Fcampaign) | ||
> Compose responsive email templates easily, fill them with models, and send them out. | ||
@@ -4,0 +6,0 @@ |
'use strict'; | ||
var hermit = require('hermit'); | ||
var options = { | ||
listIndent: ' ', | ||
listStyle: '* ', | ||
stylesheet: { | ||
h1: 'white', | ||
a: 'underline', | ||
parent: {} | ||
} | ||
}; | ||
module.exports = function () { | ||
@@ -7,8 +18,18 @@ | ||
send: function (model, done) { | ||
var body = model.body; | ||
delete model.social; | ||
delete model.styles; | ||
delete model.html; | ||
delete model.body; | ||
delete model.generated; | ||
console.log(JSON.stringify(model, null, 2)); | ||
done(); | ||
hermit(body, options, function (err, result) { | ||
console.log(result); | ||
done(); | ||
}); | ||
} | ||
}; | ||
}; |
@@ -12,3 +12,5 @@ 'use strict'; | ||
var when = moment().format('YYYY/MM/DD HH:mm, UTC Z'); | ||
model.generated = moment().format('YYYY/MM/DD HH:mm, UTC Z'); | ||
model.body = html; | ||
var layoutModel = { | ||
@@ -18,4 +20,4 @@ _header: !!model._header, | ||
preview: model.preview, | ||
generated: when, | ||
body: html, | ||
generated: model.generated, | ||
body: model.body, | ||
trapped: model.trapped, | ||
@@ -25,3 +27,2 @@ social: model.social, | ||
}; | ||
engine.render(layout, layoutModel, done); | ||
@@ -28,0 +29,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
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
43536
414
397
7
+ Addedhermit@^0.2.2
+ Addedansicolors@0.2.1(transitive)
+ Addedansistyles@0.1.3(transitive)
+ Addedcardinal@0.4.4(transitive)
+ Addedesprima@1.0.4(transitive)
+ Addedhermit@0.2.2(transitive)
+ Addedredeyed@0.4.4(transitive)
+ Addedsax@0.5.8(transitive)