Automattic / Automattic/juice

[CLI] Support unnamed recursive inlining

Open
#337 1 comment 8 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
233
Avg merge
1d 10h
Merged PRs (30d)
8

Description

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)

Contributor guide

Open the contributing guide

Research direction

Start at the CLI handling for `juice -r src dist` and trace how input files and output paths are selected. Support recursive HTML discovery with CSS inlining while preserving relative directories under `dist`; verify the example produces all three nested outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.