Git Product home page Git Product logo

mjml's Introduction

MJML Gulp Starter

Introduction

MJML Starter for Email coding with Gulp, BrowserSync & Imagemin.

MJML is a new way of writing/building super fast HTML Email without caring too much about all the various hacks/fallbacks. This starter was build to make it easier on your side to write MJML and preview the HTML rendered instantly in the browser as you code. As Emails require to have lightweight images aswell, it also comes with imagemin to compress images as you add them.

This starter uses these tools :

  • MJML 4 processor for gulp (gulp-mjml),
  • BrowserSync server for assets injections & automatic reload on changes,
  • Imagemin for lossless images compression with :
    • gifsicle — Compress GIF images
    • jpegtran — Compress JPEG images
    • optipng — Compress PNG images
    • svgo — Compress SVG images
  • MJML starter template.

Installation

Requirements

Optional

You can clone this repository doing this in your command line tool:

$ git clone https://github.com/heyflo/mjml-gulp-starter mjml-gulp-starter

Or just download the files from this repository.

Then open the folder in your command line tool and install the needed dependencies:

$ cd mjml-gulp-starter
$ npm install

Usage

Finally, run gulp watch to run Gulp & BrowserSync for development. Everything you will do will be created in a folder called dist.

$ gulp watch

Local development URL :

http://localhost:3000

Ready for production

When you are done building everything and you want to make a clean build for production, use the command line tool again and type gulp :

$ gulp

This will first delete your existing build/ folder, then process everything and send it into your build/ folder again. This is useful if you used different assets while developing and deleted some of them in your src/ folder (what you delete in this folder will still exist in the build/ folder.

Enjoy coding ✌️

mjml's People

Contributors

zukaaman avatar

Watchers

James Cloos avatar  avatar

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.