anandthakker / doiuse

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

Ignore files based on globbing. #30

Closed SevereOverfl0w closed 8 years ago

SevereOverfl0w commented 8 years ago

Ignore files if they match a glob. As discussed in https://github.com/anandthakker/doiuse/issues/29

SevereOverfl0w commented 8 years ago

Hmm, test is failing. I imagine it's due to the glob not being inclusive enough in this case.

anandthakker commented 8 years ago

@SevereOverfl0w any luck getting the test to pass?

SevereOverfl0w commented 8 years ago

Looks like I messed something up in the tests with my flattening of promises, I'm taking a look now.

SevereOverfl0w commented 8 years ago

Test now is passing!

However, I've just noticed something that I overlooked previously. I only noticed due to your comment on the docs, the ignore can be either absolute (essentially it's root + from) or relative (just from). I'm going to assume that from is the best to use, as I doubt you'd want to be polluted by the full path when ignoring files (/home/user/code/projects/something/else/src/css/normalize.css).

anandthakker commented 8 years ago

@SevereOverfl0w Nice!

Now that I think about it, seems like it would be good to have a test of your original use case in here, too, using postcss-import

SevereOverfl0w commented 8 years ago

Just reread what input.from is, it's absolute, not relative. But it is definitely the correct one to use. Doh!

Either way, that should be a test case for postcss-import, I based it on your feature ignore test.

anandthakker commented 8 years ago

Nice, this looks great. Thanks for the follow-through, @SevereOverfl0w.

anandthakker commented 8 years ago

I'm also going to add you as a collaborator, as per OPEN open source