Skip to content

Add "flatten" support for JS, CSS, and HTML with corresponding tests - #2420

Open
b-balakrishna wants to merge 2 commits into
beautifier:mainfrom
b-balakrishna:issue/2379
Open

Add "flatten" support for JS, CSS, and HTML with corresponding tests#2420
b-balakrishna wants to merge 2 commits into
beautifier:mainfrom
b-balakrishna:issue/2379

Conversation

@b-balakrishna

Copy link
Copy Markdown

⚠️ Notes
This approach is intentionally minimal and matches "singular-line" key requirement.
It is not a full parser-level production minifier; whitespace flattening after beautify was added as requested.
Behavior for complicated strings/comments is “best effort” with this lightweight minify path.

@bitwiseman

Copy link
Copy Markdown
Member

This feature is not minifying, it is "one-line-ing" or flattening, as you said.

@bitwiseman bitwiseman changed the title Add minification support for JS, CSS, and HTML with corresponding tests Add "flatten" support for JS, CSS, and HTML with corresponding tests Jun 21, 2026
Comment thread js/src/cli.js
' -r, --replace Write output in-place, replacing input',
' -o, --outfile Write output to file (default stdout)',
' --config Path to config file',
' --minify Minify to one line output (whitespace reduction)',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use the word minify for this feature. Sorry, but it is a complete misnomer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants