Allow to preserve important comments in minified CSS output while not using keepComments settings #278

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@sebcante

Hi james,

In the recent project i was working on, i needed to keep some meta tag comment even after the CSS minification.

/*!

  • Example of sticky comments
    */

This is pretty much in inline witht the what clean-css folks did (https://github.com/GoalSmashers/clean-css)

I hope someone could find it useful and we can integrate this

-seb

@jrburke

This comment has been minimized.

Show comment Hide comment
@jrburke

jrburke Sep 25, 2012

Owner

Putting this in the 2.1 bucket for consideration.

Owner

jrburke commented Sep 25, 2012

Putting this in the 2.1 bucket for consideration.

@jrburke

This comment has been minimized.

Show comment Hide comment
@jrburke

jrburke Sep 29, 2012

Owner

Unfortunately there are license comments that use the /! */ comment too, so they would be kept if keepLicenseComments was set to false. What could be done is to include the test for the /! */ comment as part of the preserveLicenseComments: true pathway though. But otherwise, it will cause unwanted behavior for the false case.

Going to push this out of 2.1 and wait to get a good story for this.

Owner

jrburke commented Sep 29, 2012

Unfortunately there are license comments that use the /! */ comment too, so they would be kept if keepLicenseComments was set to false. What could be done is to include the test for the /! */ comment as part of the preserveLicenseComments: true pathway though. But otherwise, it will cause unwanted behavior for the false case.

Going to push this out of 2.1 and wait to get a good story for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment