CLI commands in Maizzle
The CLI tool includes commands for scaffolding, developing, and building your emails.
maizzle new [path] [repo] --no-deps?
new command is used to scaffold and initialize a Maizzle project.
It accepts two arguments, both optional:
||string||no||maizzle||Directory name to create project in|
|Git repository URL for a starter project|
||Don't install NPM dependencies|
Running it with no arguments will:
- Create a
- Clone the
maizzle/maizzlerepo into it
- 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.
[path]directory already exists, scaffolding will be aborted.
[repo]must be a valid Git repository URL (.git extension included).
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.
||string||no||local||An environment name to use. This is the
[env]is specified, Maizzle will default it to
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
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.