0.0.4 • Published 9 years ago

gulp-mc-inliner v0.0.4

Weekly downloads
54
License
MIT
Repository
github
Last release
9 years ago

gulp-mc-inliner

Gulp plugin for inlining CSS throught MailChimps Inliner API.

NPM

Usage

npm install gulp-mc-inliner --save-dev

Create mailchimp.json file and add your MailChimp API key.

{
  "KEY": "your key goes here"
}

Require both in your gulpfile.js:

var inliner = require('gulp-mc-inliner');
var config = require('config/mailchimp');

gulp.task('inline', function() {
  gulp.src('src/*.html')
    .pipe(inliner(config.KEY))
    .pipe(gulp.dest('email/template.html'));
});

API

inliner(key, strip)

key

Type: String

MailChimp API Key. Create a API key from your MailChimp Account.

stripCSS

Type: boolean Default: false

Boolean value indicating to the MailChimp API whether to strip CSS from the head tag.


This gulp plugin is a rewite of https://github.com/jayzawrotny/gulp-mc-inline-css with added option to specify whether or not to strip style tags from the head tag.

More features coming soon.