Skip to content

An email templating starter package using MJML for templating and Vite for development.

License

Notifications You must be signed in to change notification settings

EvgenyLeukhin/mjml-email-starter

 
 

Repository files navigation

mjml. Email Starter Package

mjml. Vite TypeScript Node.js NPM

Preview

📖 About

An email templating starter package using mjml. for templating and Vite for development.

Useful resources:

🔧 Requirements

Node.js 20 installed on your machine

See Node.js or preferably use NVM (Node Version manager)

🚀 Quick Start

Install Node.js dependencies

npm i

Start the development server and mjml. watcher (typically on localhost:5173)

npm run dev

Start templating your email in the src directory.

📦 Build

Build the email template to the dist directory

npm run build

Preview the email build in the browser

npm run preview

🧰 Tools

Run the TypeScript test

npm run test

Format code with Prettier

npm run format

To allow Prettier to format your code on save, configure your editor:
Prettier Editor Integration

ℹ️ Ensure to include .mjml files in your editor's Prettier configuration

📤 Sending Test Emails with SMTP

It is possible to send test emails of a build. It requires to set up a .env according to the .env.example file.

cp .env.example .env

Fill in the required SMTP credentials, and email addresses.

Then run the following command to send a test email:

npm run send:mail

Guthub demo hosting

Demo

About

An email templating starter package using MJML for templating and Vite for development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 80.3%
  • JavaScript 19.7%