Git Product home page Git Product logo

gulp-template-mandrill's Introduction

gulp-template-mandrill

gulp-template-mandrill allows to upload new templates or update existing ones to your Mandrill account via the Mandrill API.

Usage

To use gulp-template-mandrill, do :

gulp.task('mailTemplates', function(){
  return gulp.src(pathToTemplates)
    .pipe(gulpTemplateMandrill({
      key: 'insert mandrill api key here',
      JSONpath: './other/json/' // optional
    }));
});

You need to have a .json file that contains the Mandrill information for your template, with the same name as the html file it refers to. If it's in the same folder as your .html, you don't need to specify JSONpath.

Such as :

templates:
  \- foo.html
  \- foo.json

Where foo.json contains at least a name attribute for the template:

{
  "name": "Example Template",
  "from_email": "[email protected]",
  "from_name": "Example Name",
  "subject": "example subject",
  "code": "<div>example code</div>",
  "text": "Example text content",
  "publish": false,
  "labels": [
    "example-label"
  ]
}

See Mandrill API docs for reference.

Features

  • Add new template
  • Update existing template

TODO

  • Add wordwrap to html2txt

gulp-template-mandrill's People

Contributors

ekampf avatar thamosio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gulp-template-mandrill's Issues

Task completes, nothing in mandrill

I'm trying to debug why mine isn't working and i'm coming up short.

gulp.task('mandrill', function(){
  return gulp.src('mandrill')
    .pipe(gulpTemplateMandrill({
      key: 'blahblahblah'
    }));
});

I generated that key from https://mandrillapp.com/settings/index . I have one html file and a json file under my mandrill folder. Here's the json

{
  "name": "Test Gulp2",
  "from_email": "[email protected]",
  "from_name": "Caleb",
  "subject": "Thank you",
  "code": "<div>example code</div>",
  "text": "Example text content",
  "publish": false,
  "labels": [
    "Test"
  ]
}

And nothing happens when I run gulp mandrill Well, it starts and finishes in 12ms. Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.