Automattic / juice

Juice inlines CSS stylesheets into your HTML source.
MIT License
3.1k stars 220 forks source link

[CLI] Support unnamed recursive inlining #337

Open staghouse opened 5 years ago

staghouse commented 5 years ago

The outputting is currently pretty restrictive as it seems to require explicit file naming. Would be fantastic if this package could support inlining files recursively and map them to an output directory. For example:

Given... src/a/1.html src/a/2.html src/b/1.html

and command...

juice -r src dist

Juice look in the src directory for all html files, inline the CSS source and output it to the dist folder, nested respectfully. For example:

dist/a/1.html (css inlined) dist/a/2.html (css inlined) dist/b/1.html (css inlined)

karlhorky commented 2 years ago

Would also like this!

In the meantime, @yo-gi has a simple workaround in #374 🙌