{"id":13437273,"url":"https://github.com/mjmlio/gulp-mjml","last_synced_at":"2025-04-05T22:07:30.371Z","repository":{"id":3692493,"uuid":"50596365","full_name":"mjmlio/gulp-mjml","owner":"mjmlio","description":"Add Gulp to your MJML workflow!","archived":false,"fork":false,"pushed_at":"2022-12-09T16:21:29.000Z","size":284,"stargazers_count":162,"open_issues_count":18,"forks_count":37,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-01T13:20:06.899Z","etag":null,"topics":["email","emails","gulp","html","mjml","responsive-email"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjmlio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-28T16:26:48.000Z","updated_at":"2024-04-01T21:28:11.000Z","dependencies_parsed_at":"2023-01-11T16:33:06.722Z","dependency_job_id":null,"html_url":"https://github.com/mjmlio/gulp-mjml","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjmlio%2Fgulp-mjml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjmlio%2Fgulp-mjml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjmlio%2Fgulp-mjml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjmlio%2Fgulp-mjml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjmlio","download_url":"https://codeload.github.com/mjmlio/gulp-mjml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406089,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","emails","gulp","html","mjml","responsive-email"],"created_at":"2024-07-31T03:00:55.600Z","updated_at":"2025-04-05T22:07:30.340Z","avatar_url":"https://github.com/mjmlio.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n# Gulp MJML\n\nAdd MJML to your gulp workflow!\n\n## Usage:\n\n\u003e With an MJML file named `test.mjml`, render your emails to an html folder:\n\n```javascript\nconst gulp = require('gulp')\nconst mjml = require('gulp-mjml')\n\ngulp.task('default', function () {\n  return gulp.src('./test.mjml')\n    .pipe(mjml())\n    .pipe(gulp.dest('./html'))\n})\n```\n\n\u003e 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:\n\n```javascript\nconst gulp = require('gulp')\nconst mjml = require('gulp-mjml')\n\n// Require your own components if needed, and your mjmlEngine (possibly with options)\n// require('./components')\nconst mjmlEngine = require('mjml')\n\ngulp.task('default', function () {\n  return gulp.src('./test.mjml')\n    .pipe(mjml(mjmlEngine, {minify: true}))\n    .pipe(gulp.dest('./html'))\n})\n```\n\n\u003e If you'd like to get validation errors and , use `strict` and a custom error handler function. _Note that using `strict` will not render the file in case of error_:\n\n```javascript\nconst gulp = require('gulp')\n\nconst mjml = require('gulp-mjml')\nconst mjmlEngine = require('mjml')\n\nfunction handleError (err) {\n  console.log(err.toString());\n  this.emit('end');\n}\n\ngulp.task('default', function () {\n  return gulp.src('./test.mjml')\n    .pipe(mjml(mjmlEngine, {validationLevel: 'strict'}))\n    .on('error', handleError)\n    .pipe(gulp.dest('./html'))\n})\n```\n\n\u003e If you want to override the default file extension that is output use `fileExt`\n\n```javascript\nconst gulp = require('gulp')\nconst mjml = require('gulp-mjml')\n\nconst mjmlEngine = require('mjml')\n\ngulp.task('default', function () {\n  return gulp.src('./test.mjml')\n    .pipe(mjml(mjmlEngine, {minify: true, fileExt: \".txt\"}))\n    .pipe(gulp.dest('./html'))\n})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjmlio%2Fgulp-mjml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjmlio%2Fgulp-mjml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjmlio%2Fgulp-mjml/lists"}