Have ideas to improve npm?Join in the discussion! »

    gulp-mc-inliner

    0.0.4 • Public • Published

    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.

    Install

    npm i gulp-mc-inliner

    DownloadsWeekly Downloads

    40

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • avatar