Daryll Doyle WordPress Development and Consultancy in Cornwall

Jumping into open source – Gulp-Email-Creator


Until now, I’ve only ever dipped my toe into the open source community, adding issues there, commenting here, maybe making the odd pull request. Today, I decided to jump in and whether anything will come of it, I don’t have a clue.

I was sat around tonight thinking about making up some HTML emails, whilst thinking about it, I realised how bad my workflow around this is, currently I do the following:

  1. Create HTML templates
  2. Write SCSS and compile into CSS
  3. When happy with HTML and CSS, add CSS into <style> tags inside the HTML
  4. Take this updated HTML and CSS file and run it through Mailchimps CSS Inliner tool

This seems awfully long winded and awkward just to create some HTML with inline CSS. Then today, whilst exploring Github, I stumbled across Lee Munroe’s grunt-email-design repository. This got me thinking, if there is something like this for Grunt, then there must be for Gulp, my task runner of choice. After a bit of Googling around, I couldn’t find anything that was documented or that looked near a usable state, so I thought why not have a go? The worst that could happen is that it’s a failure and even I don’t use it.

With that, I started on Gulp-Email-Creator. Version 1.0.0 is now up on GitHub and available for people to use/hack/contribute to. It seems to work quite well and has shortened my HTML email workflow from the above to:

  1. Create email templates
  2. Write SCSS
  3. Grab compiled file with inline CSS

Just for a bit of workflow speed, I added livereload. A colleague at work got me using it not long ago and I must say, I’ve found it amazingly useful since.

Anyway, I think that’s about it. Go check out the repository and let me know your thoughts!

About the author

Daryll Doyle

Daryll is a Lead Web Engineer at 10up.

He is the original author of the SVG sanitisation plugin Safe SVG, which has over 500,000 installs from the WordPress.org plugin directory and is now maintained by 10up.

He has also spoken publicly about SVGs and WordPress, including a talk at WordCamp London 2018.

In his spare time he enjoys spending time with his family and researching Developer Experience.

1 comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Daryll Doyle WordPress Development and Consultancy in Cornwall