CLI commands in Maizzle

The CLI tool includes commands for scaffolding, developing, and building your emails.

new

maizzle new [path] [repo] --no-deps?

The new command is used to scaffold and initialize a Maizzle project.

It accepts two arguments, both optional:

Argument Type Required Default value Description
[path] string no maizzle Directory name to create project in
[repo] string no
https:‌//github.com/maizzle/maizzle
Git repository URL for a starter project
Flag Shorthand Description
--no-deps -d Don't install NPM dependencies

Running it with no arguments will:

  1. Create a maizzle directory
  2. Clone the maizzle/maizzle repo into it
  3. Install the NPM dependencies

So you can basically clone any repo into any system path, which means you can use any starter project - not just ours - as long as you can clone it with Git.

build

maizzle build [env]

maizzle build is used to compile your templates and output them to the destination directory. If [env] is specified, Maizzle will try to merge config.[env].js on top of the default config.

Argument Type Required Default value Description
[env] string no local An environment name to use. This is the [env] in your config.[env].js file name.

serve

maizzle serve

Use this command to develop emails locally.

A local development server is first created with BrowserSync, maizzle build is then called, and a directory listing is finally opened in your default browser.

You can make changes to a file, save it, and have the browser automatically reload for you. And, of course, you can also configure BrowserSync.

This command has the fastest build time, since most Transformers are disabled on purpose for local development, in the default config.js.

When developing locally, you have all classes generated by Tailwind CSS at your disposal, so you can rapidly prototype and style emails, even right in the browser.