Skip to content
Simple gulpfile.js setup for creating e-mail templates a bit simpler.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
compiled
src
.gitignore
LICENSE
README.md
gulpfile.js
package.json

README.md

GulpNewsletter

Super simple responsive email template.

This is a workflow I've been using for a while to create e-mail templates. With gulp, I build the template just as if it was a "normal" website, and then I let Gulp handle the "inlineing" of the CSS.

How to use

After you have installed node and gulp. Just run

$ npm install

and then

$ gulp watch

In the src directory, edit the index.html and/or the main.less-file and you will get two versions in the compiled directory. One (index-external.html) with the compiled LESS/CSS file (for use with for example CampaignMonitor, which handles linked css-files automatically) and one version with inlined CSS.

You can put images and other assets pretty much wherever you want, just use relative paths. I find it convenient to put them in the compiled directory. You could of course have them in the src directory, and just let gulp copy them over.

About the template

The template that comes along in the src directory is just an example. There are some major issues with Outlook.

More

You can read more about this gulpfile and template at this blog post (in swedish).

You can’t perform that action at this time.