This project contains responsive email templates built with MJML.
.
├── src/ # MJML source files
│ └── welcome.mjml
├── dist/ # Generated HTML files
│ └── welcome.html
├── package.json # Project configuration
└── README.md # This file
- Install dependencies:
npm install
- Build the templates:
# Build all templates
npm run build:all
# Build specific template
npm run build:welcome
# Watch for changes and auto-build
npm run watch
npm run build
: Builds the welcome template (alias for build:welcome)npm run build:welcome
: Builds only the welcome templatenpm run build:all
: Builds all MJML templates in the src directorynpm run watch
: Watches for changes in src/*.mjml and rebuilds automatically
- Create a new MJML file in the
src
directory (e.g.,src/newsletter.mjml
) - Add a new build script in
package.json
if needed:"build:newsletter": "mjml src/newsletter.mjml -o dist/newsletter.html"
- Run
npm run build:all
to build all templates or your specific build script
To customize any template:
- Edit the MJML file in the
src
directory - Replace placeholder images with your own
- Update colors, text, and links
- Run the appropriate build command to generate the new HTML
Test the generated HTML emails (from the dist
directory) in various email clients to ensure compatibility.