anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.24k stars 51 forks source link

specify files? #103

Closed badtant closed 1 year ago

badtant commented 5 years ago

Hi,

I'm trying to use the JS example don't understand how to specify which files to check. These is a ignoreFiles option but no files option?

Thanks

brettz9 commented 4 years ago

The JS API is apparently meant to be used with postcss.

The doiuse function does not accept files but instead returns an object with a postcss callback, and it is that callback which gets passed the files (based on thecss object passed into it): https://github.com/anandthakker/doiuse/blob/master/src/doiuse.js#L37 . You'd have to look at postcss to understand how this is processed.

clshortfuse commented 1 year ago

Answered.