Skip to content

tetloose/tetloose-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forthebadgeforthebadgeforthebadgeforthebadge

Tetloose-Email

Initial Setup

yarn setup

Installs node modules, builds an email, then runs yarn dev - First load might require a page refresh

How to use

yarn dev - Start the framework

Create email templates in ./src/templates/*.html include partials from ./src/partials. After saving, partials are merged into ./src/email/*.html then automaticly moved to ./dist/*.html with css injected into markup.

Requirements

  1. node v14.16.0 nvm use 14.16.0
  2. npm ^6.13.4

Commands

  1. yarn dev - Browser sync + watch
  2. yarn images - Image Minification
  3. yarn build - Add build files to zip
  4. yarn partials - Compiles partials into templates
  5. yarn build - Add build files to zip

Templates

  1. html templates /src/templates/*.html

Partials

  1. html templates /src/partials/*.html

Include partials @@include('../partials/header.html').

CSS

  1. Reset /src/scss/reset.scss - Embeded in head
  2. Inline /src/scss/inline.scss - Injected into markup
  3. Mobile /src/scss/mobile.scss - Embeded in head below reset

Image minification

  1. Image folder /src/images/
  2. Run yarn images
  3. Images Minified and moved to /dist/images/

Email Test

  1. Update .env test variables line 14 - 17
TEST_FILE = './dist/index.html'
TEST_EMAIL_TO = '[email protected]'
TEST_EMAIL_FROM = '[email protected]'
TEST_SUBJECT = 'Gulp Email Test'
  1. Run yarn test
  2. Visit email client, look in SPAM folder

Build

This builds a zip ready to be uploaded to mailchimp

  1. Run yarn build
  2. Copy html template name from the list
  3. Paste and hit Enter
  4. Zip file created by name and date, then moved to ./dist/zips
  5. Upload this zip to mailchimp
  6. Test in mailchimp, realise every email client does it's own thing and nothing works.
  7. Throw laptop into the sea!

Note!

If you get an error on first load, save the template the refresh the page, will fix that issue. Sometimes CSS isn't injected during build, fix this by re running the build process.

Usefull links

https://github.com/Email-builder/gulp-email-builder www.litmus.com

About

Email Template Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published