Open mosesoak opened 2 years ago
It might not be as hard as it seems but I don't have time to properly test this.
@mosesoak I have a solution that uses gulp/nodemon to do what you're talking about. LMK if you'd like an example repo.
@probablyabear Sure if you have time to link to a public repo that sounds helpful. We typically don't use Gulp but then again our email workflow has bash scripts and a bunch of rando tools so why not! Thanks
Is your feature request related to a problem? Please describe.
Would like build and develop to easily output multiple files when using glob path for the input. Currently, as reported in https://github.com/mjmlio/mjml/issues/1014, just a single file is outputted. (Based on my testing, I don't believe that issue was ever actually resolved.)
When building a batch of emails you want to be able to move between them during development and then publish the whole batch when complete.
Describe the solution you'd like
It would be cool if
mjml
would publish a matching directory structure based on the glob input. Something like this:mjml -w src/**/index.mjml -o public/
Currently, not even the -o folder gets created (e.g.
public
), and mjml errors if it doesn't exist. With this feature, the output directory and all matching subdirectories found for eachindex.mjml
file would be automatically created.Describe alternatives you've considered
We're currently writing our own scripts to run multiple builds. I can potentially look into running nodemon as a development workaround as mentioned in https://github.com/mjmlio/mjml/issues/755.