purifycss / purifycss

Remove unused CSS. Also works with single-page apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File Patterns in CLI: They Work (?)

bdkjones opened this issue · comments

The very bottom of the readme says: "file patterns do not currently work in the CLI".

That appears to be untrue, however. Enclosing the wildcard path in single quotes causes Bash to use the literal character value of *. In the command below, I'm running from the Terminal on macOS 10.13.3 in the media_queries folder that ships with purify-css as a test:

purify-css media_queries.css '*.html' -o out.css

From what I can tell, this runs correctly and out.css is indeed missing some CSS.

Question:

Is there another reason you don't officially support wildcards in the CLI besides the escaping required for asterisks in Bash? In short, if I rely on this approach, am I going to hit some weird bugs I'm not aware of?

No, this will not affect your results.