Skip to content

Instantly share code, notes, and snippets.

@deodat
Created October 15, 2019 17:08
Show Gist options
  • Save deodat/e9b914a8928a1dbed62920efcf0c2b8f to your computer and use it in GitHub Desktop.
Save deodat/e9b914a8928a1dbed62920efcf0c2b8f to your computer and use it in GitHub Desktop.
Gulpfile for watching changes in editing a MJML email
const gulp = require('gulp');
const mjml = require('gulp-mjml');
gulp.task('mjml', function() {
return gulp.src('./index.mjml')
.pipe(mjml())
.pipe(gulp.dest('./html'))
});
gulp.task('watch', function() {
gulp.watch('index.mjml', gulp.series('mjml'));
});
gulp.task('default', gulp.series('watch', 'mjml'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment