I made a post 2 weeks ago about how to reduce CSS automatically: Scan Duplicated & Similar CSS and the github source: css-checker
Few days ago, there was an issue asking for styled components support. It's very hard to found few sources about processing styled components using golang, so I have to use regex to detect them and use original css-checker functions to detect diffs in styled-components.
Fortunately, it goes well to use css-checker for styled-components checking and you can use this now for styled-components check. It can check similar lines and prints those blocks with diff lines highlighted.
Install
- You can access to the package via
go install
:
go install github.com/ruilisi/css-checker@latest
(With go version before 1.17, use go get github.com/ruilisi/css-checker). Or download from releases
- Or from npm:
npm install -g css-checker-kit
Start Checking
-
cd
to yourProject Path
. Then just run:
css-checker -styled
- If only need to check styled-components:
css-checker -css=false -styled
For other usages, please refer to github: CSS-Checker
Top comments (0)