4.15.3 • Published 3 months ago

mjml-cli v4.15.3

Weekly downloads
203,628
License
MIT
Repository
github
Last release
3 months ago

mjml-cli

Installation

We recommend installing and using MJML locally, in a project folder where you'll use MJML:

npm install mjml

In the folder where you installed MJML you can now run:

./node_modules/.bin/mjml input.mjml

To avoid typing ./node_modules/.bin/, add it to your PATH:

export PATH="$PATH:./node_modules/.bin"

You can now run MJML directly, in that folder:

mjml input.mjml

MJML is written with NodeJS You can download and install the MJML engine from NPM.

Command Line Interface

In addition to the translation engine, which converts MJML to email HTML, we've bundled a Command Line Interface (CLI) helping you to achieve the basic features it offers and integrate it seamlessly in your development flow.

Render MJML to HTML

mjml input.mjml

It will output a HTML file called input.html.

Migrate MJML3 to MJML4

$> mjml -m input.mjml -o result.mjml

It will output a HTML file called input.html.

Render and redirect the result to stdout

mjml -s input.mjml

# or

mjml --stdout input.mjml

Minify and beautify the output HTML

$> mjml input.mjml --config.beautify true --config.minify false

These are the default options.

Render and redirect the result to a file

mjml input.mjml -o my-email.html

# or

mjml input.mjml --output my-email.html

You can output the resulting email responsive HTML in a file. If the file does not exist, it will be created.

Set the validation rule to skip so that the file is rendered without being validated.

mjml -l skip -r input.mjml

Watch changes on a file

mjml -w input.mjml

# or

mjml --watch input.mjml

If you like live-coding, you might want to use the -w option that enables you to re-render your file every time you save it. It can be time-saving when you can just split you screen and see the HTML output modified when you modify your MJML.

Of course, the -w option can be used with an --output option too.

5.0.0-alpha.1

3 months ago

5.0.0-alpha.0

3 months ago

4.15.3

3 months ago

4.15.0

3 months ago

4.15.1

3 months ago

4.15.2

3 months ago

4.14.1

1 year ago

4.14.0

1 year ago

4.13.0

2 years ago

4.12.0

2 years ago

4.11.0

2 years ago

4.10.4

3 years ago

4.10.3

3 years ago

4.10.2

3 years ago

4.10.1

3 years ago

4.10.0

3 years ago

4.9.3

3 years ago

4.9.2

3 years ago

4.9.1

3 years ago

4.9.0

3 years ago

4.8.2

3 years ago

4.8.1

3 years ago

4.8.0

3 years ago

4.7.1

4 years ago

4.7.0

4 years ago

4.7.0-beta.2

4 years ago

4.7.0-beta.1

4 years ago

4.7.0-beta.0

4 years ago

4.6.3

4 years ago

4.6.3-alpha.0

4 years ago

4.6.2

4 years ago

4.6.1

4 years ago

4.6.0

4 years ago

4.5.1

5 years ago

4.5.0

5 years ago

4.4.1

5 years ago

4.4.0

5 years ago

4.4.0-beta.3

5 years ago

4.4.0-beta.2

5 years ago

4.4.0-beta.1

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.1

5 years ago

4.2.0

6 years ago

4.2.0-beta.3

6 years ago

4.2.0-beta.2

6 years ago

4.2.0-beta.1

6 years ago

4.1.2

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.1.0-beta.4

6 years ago

4.1.0-beta.3

6 years ago

4.1.0-beta.2

6 years ago

4.1.0-beta.1

6 years ago

4.0.5

6 years ago

4.0.4

6 years ago

4.0.3

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

4.0.0-beta.2

6 years ago

4.0.0-beta.1

6 years ago

4.0.0-alpha.5

6 years ago

4.0.0-alpha.4

6 years ago

3.3.5

7 years ago

3.3.4

7 years ago

4.0.0-alpha.3

7 years ago

3.3.3

7 years ago

4.0.0-alpha.2

7 years ago

4.0.0-alpha.1

7 years ago

3.3.3-beta.2

7 years ago

3.3.3-beta.1

7 years ago

3.3.2

7 years ago

3.3.1

7 years ago

3.3.0

7 years ago

3.3.0-beta.8

7 years ago

3.3.0-beta.7

7 years ago

3.3.0-beta.6

7 years ago

3.3.0-beta.5

7 years ago

3.3.0-beta.4

7 years ago

3.3.0-beta.3

7 years ago

3.3.0-beta.2

7 years ago

3.3.0-beta.1

7 years ago

3.2.2

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.2.0-beta.2

7 years ago

3.2.0-beta.1

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.1.0-beta.1

7 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

3.0.0-beta.3

8 years ago

3.0.0-beta.2

8 years ago

3.0.0-beta.1

8 years ago

2.3.2

8 years ago

2.3.1

8 years ago

2.3.1-beta.1

8 years ago

2.3.0

8 years ago

2.3.0-beta.7

8 years ago

2.3.0-beta.6

8 years ago

2.3.0-beta.5

8 years ago

2.3.0-beta.4

8 years ago

2.3.0-beta.3

8 years ago

2.3.0-beta.2

8 years ago

2.3.0-beta.1

8 years ago

2.2.0

8 years ago

2.1.5-beta.1

8 years ago

2.1.4

8 years ago

2.1.4-beta.1

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

2.0.0-beta.6

8 years ago

2.0.0-beta.5

8 years ago