Mjml: Change file extension for multiple files with cli

Created on 2 Nov 2017  路  2Comments  路  Source: mjmlio/mjml

I want to parse multiple files with the mjml cli, and rename there extension:

mjml ./src/assets/mails/templates/*.mjml -o ./src/assets/mails/compiled/*.blade.php

But he gives me this error Output destination should be a directory instead of a file. If i change the output to only the folder ./src/assets/mails/compiled he places me the correct files, but only with .html.

Most helpful comment

Hi @windows1087

Can you try to rename your file like this : .mjml.blade.php it should remove the .mjml in the output if you give a directory

All 2 comments

Hi @windows1087

Can you try to rename your file like this : .mjml.blade.php it should remove the .mjml in the output if you give a directory

Oh nice, thank you! :)

Was this page helpful?
0 / 5 - 0 ratings