usedcss icon indicating copy to clipboard operation
usedcss copied to clipboard

Make the use case more clear in the Readme

Open kobelobster opened this issue 9 years ago • 1 comments

Hello,

I'm a backend developer, so I'm always looking for libraries which help me be more professional in the frontend. I stumbled upon this library but have some questions about the use case.

Is this library only for HTML files? Or does it also go through JavaScript and check if I somewhere apply a class via JS to a module? Also, what about php files? Let's say I'm building my class like this

$className = 'class-' . rand(0, 10);

This creates a "random" class name. What if I never use the class directly in HTML/JS but only in the php files. Will this be able to do this?

So in short: What files does the library check?

HTML ? JS ? PHP ?

Would be awesome if you could put this type of information somewhere.

kobelobster avatar Apr 11 '16 09:04 kobelobster

For now it's check only HTML files. Parsing JS will be probably supported in future, PHP is very unlikely, but you can use ignore or ignoreRegexp options. So with your example ignoreRegexp: [/class-.*/] does the trick.

komachi avatar Apr 11 '16 09:04 komachi