## Summary - Adds `--stream` flag to `tailwindcss canonicalize` that reads candidate groups from stdin line by line and writes canonicalized results to stdout - Keeps the design system loaded across requests, making it suitable as a long-running sidecar process - Empty lines pass through, keeping request/response pairs aligned ## Motivation Non-JS tools (formatters, editor plugins, etc.) currently have no lightweight way to canonicalize Tailwind classes. The existing batch mode works for one-off use, but tools that need to canonicalize repeatedly pay the cost of loading the design system each time. With `--stream`, a tool can start `tailwindcss canonicalize --stream` once and send candidate groups over stdin as needed: ```sh $ echo -e "py-3 p-1 px-3\nmt-2 mr-2 mb-2 ml-2" | tailwindcss canonicalize --stream p-3 m-2 ``` Related discussion: https://github.com/tailwindlabs/tailwindcss/discussions/19736 --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com> |
||
|---|---|---|
| .. | ||
| commands | ||
| utils | ||
| index.ts | ||