Getting Started

Requirements

Maizzle needs a few tools installed on your machine.

Node.js

You'll need Node.js installed. Either download and install the LTS version from the link, or use this command to check if you already have it:

node -v

Git

The maizzle new command for scaffolding a new project works by cloning a Git repository, so you'll also need to have Git installed.

Check if you already have it by running this command:

git --version

Installation

Maizzle consists of:

  • a CLI tool
  • the Framework
  • a Starter project

When developing emails on your local machine with Maizzle, you typically run a CLI command inside your Starter project directory.

That command asks the Framework to build the emails inside your current project, based on config files that it finds in there.

Install the CLI tool globally, so the maizzle executable gets added to your $PATH :

npm install -g @maizzle/cli

Create a project

Create your first Maizzle project by opening a Terminal and running:

maizzle new

This will bring up an interactive prompt which will guide you through the setup:

maizzle new interactive prompt

Of course, you can also skip the prompt and scaffold a project immediately:

maizzle new https://github.com/maizzle/maizzle.git

Once that's done, change your current directory to the project root:

cd maizzle

Congratulations, you can now start using Maizzle!

Development

Maizzle includes different commands for developing locally on your machine and building production-ready emails.

Local

Start local email development by running the serve command:

maizzle serve

This will start a local server that you can access at http://localhost:3000 - when you make a change to a template and save it, the browser will refresh to reflect that.

Production

Build production-ready emails, with inlined CSS and many other optimizations, by running the following command:

maizzle build production

This will use settings in your config.production.js to compile email templates that you can send via your ESP.

Check out the Commands docs for more details.

Updating

Maizzle is listed as a dependency in your project's package.json file:

"dependencies": {
  "@maizzle/framework": "^3.0.0"
}

To update, first bump that number to the Maizzle release that you want to upgrade to:

"dependencies": {
  "@maizzle/framework": "^4.0.2"
}

Then, re-install dependencies by running npm install in your project's root folder.

Clean update

If for some reason you're not getting the latest version or are running into installation issues, simply delete your node_modules folder and your package-lock.json file from the root of your project, and then run npm install.

This will do a fresh install of all dependencies.