1.0.8 • Published 6 years ago

gulp-mjml-cshtml v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Gulp MJML

Add Gulp to your MJML workflow!

Usage:

With an MJML file named test.mjml, render your emails to an html folder:

var gulp = require('gulp')
var mjml = require('gulp-mjml-cshtml')

gulp.task('default', function () {
  return gulp.src('./test.mjml')
    .pipe(mjml())
    .pipe(gulp.dest('./html'))
})

If you have custom components linked to your own mjmlEngine, you can pass it to the gulp task so it uses your engine to render the html:

var gulp = require('gulp')
var mjml = require('gulp-mjml-cshtml')

// Require your own components if needed, and your mjmlEngine (possibly with options)
// require('./components')
var mjmlEngine = require('mjml')

gulp.task('default', function () {
  return gulp.src('./test.mjml')
    .pipe(mjml(mjmlEngine, {minify: true}))
    .pipe(gulp.dest('./html'))
})
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago