Mjml: Specify extension for output files on batch compile

Created on 8 May 2018  路  4Comments  路  Source: mjmlio/mjml

There doesn't seem to be any way to set the extension on batch template compiles. E.g., mjml -w src/*.mjml -o dist/ will always output the file with .html extension.

Feature request:

I'd like to be able to tell the mjml command what extension to use, e.g., mjml -w src/*.mjml -o dist/ --extension php.

MJML version:

4.0.5

Most helpful comment

If anyone is wondering how to do this without using external tools, see https://github.com/mjmlio/mjml/issues/866#issuecomment-341402361 :smiley:

That issue asks a very similar question, so I thought it would be helpful to link it here.

All 4 comments

Hi @samatcd

We had something similar in the last cli, but it's quite painful to manage, I think it's way easier to do it with gulp ?

I think the CLI should have basic feature to suit basic needs, but a task runner like gulp fit more for that kind of works

Ok, thanks - will sort something out. Was hoping for a simple solution, but understand that position if it's not straight-forward.

If anyone is wondering how to do this without using external tools, see https://github.com/mjmlio/mjml/issues/866#issuecomment-341402361 :smiley:

That issue asks a very similar question, so I thought it would be helpful to link it here.

@Calinou Thanks a bunch, worked like a charm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theVannu picture theVannu  路  3Comments

sinsunsan picture sinsunsan  路  4Comments

csmcanarney picture csmcanarney  路  3Comments

tobystokes picture tobystokes  路  3Comments

liminspace picture liminspace  路  3Comments