I find that if I use a glob pattern in my input, then watch reports it is watching [the first matching file] but doesn't appear to do so.
Example:
mjml src/emails/*.mjml --output dist/emails -> this builds all the input files.
mjml --watch src/emails/*.mjml --output dist/emails - > This does initially generate the files, but reports: Now watching: src/emails/firstfile.mjml but doesn't then watch for changes on that or any other file.
mjml --watch src/emails/singlefile.mjml --output dist/emails -> watches a single file as expected.
Hi @tobystokes
It's a cli bug, MJML 4 should fix that issue ;)
A workaround:
"scripts": {
"start": "nodemon -e mjml node_modules/.bin/mjml -r src/*.mjml -o dist/", // use nodemon
"build": "mjml -r src/*.mjml -o dist/"
},
Hi @tobystokes
Latest allow you to watch multiple files ( if you're using zsh you have to escape the wildcard char *) !
Feel free to open an issue if you find some bugs with it 馃憤
Most helpful comment
A workaround: