awinogradov / enb-postcss

PostCSS for ENB
11 stars 7 forks source link

Add oneOfSourceSuffixes option #36

Closed tadatuta closed 7 years ago

tadatuta commented 7 years ago

Closes #34

Possible values of oneOfSourceSuffixes option:

null or any other falsy value // as if there was no oneOfSourceSuffixes option
'css' // keep just files with `css` tech
['post.css', 'css'] // keep just one of these techs, order is significant
[['post.css', 'css'], 'ie.css', 'styl'] // keep (post.css || css) + ie.css + styl
[['post.css', 'css'], ['ie.post.css', 'ie.css']] // (post.css || css) + ('ie.post.css' || 'ie.css')
[['post.css', 'css'], 'blah', ['ie.post.css', 'ie.css']] // (post.css || css) + blah + ('ie.post.css' || 'ie.css')
awinogradov commented 7 years ago

Why this

[['post.css', 'css'], ['ie.post.css', 'ie.css']] // (post.css || css) + ('ie.post.css', 'ie.css')
[['post.css', 'css'], 'blah', ['ie.post.css', 'ie.css']] // (post.css || css) + blah + ('ie.post.css', 'ie.css')

not this?

[['post.css', 'css'], ['ie.post.css', 'ie.css']] // (post.css || css) + ('ie.post.css' || 'ie.css')
[['post.css', 'css'], 'blah', ['ie.post.css', 'ie.css']] // (post.css || css) + blah + ('ie.post.css' || 'ie.css')
tadatuta commented 7 years ago

Sure, you are right, it's a typo. Fixed.

awinogradov commented 7 years ago

👍