7rulnik / postcss-flexibility

PostCSS plugin for Flexibility polyfill
MIT License
296 stars 14 forks source link

Add support for loud comments #101

Closed simoneldevig closed 7 years ago

simoneldevig commented 7 years ago

It is very important the add support for loud comments when working in production environments since normal comments are removed when compiling sass with as compressed.

7rulnik commented 7 years ago

@simoneldevig hi! Thank you for PR. I think we can use String.prototype.includes instead of two equality checks. Can you do it?

simoneldevig commented 7 years ago

@7rulnik I've tried to change it to use includes, but since the text that does not contain flexibility-disable is undefined it means that it would require an ekstra check anyways? :-)

7rulnik commented 7 years ago

@simoneldevig you can use default argument rule.some(({prop, text = ''}) =>

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 84cced60fe942fa04b5111bd726bf4adddcdc709 on nozebra:loud-comment-support into on 7rulnik:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 84cced60fe942fa04b5111bd726bf4adddcdc709 on nozebra:loud-comment-support into on 7rulnik:master.

simoneldevig commented 7 years ago

@7rulnik I've changed the check to use endsWith since I ran in some issues with includes on not loud comments. I also added a test for loud comments as well :-)

7rulnik commented 7 years ago

@simoneldevig nice! Thank you for tests. I will merge and release it at saturday.

7rulnik commented 7 years ago

@simoneldevig just released it in 1.0.1. Thanks!