问题
Is there a way to keep license/credit comments when the JavaScript is being minified by YUICompressor? Is there any special commenting characters? Or any flag for that in YUICompressor?
Thanks, Grace
回答1:
Yes, use
/*!
*
*/
The exclamation tells the compressor to retain the comment.
Documentation
来源:https://stackoverflow.com/questions/6614532/skip-license-credit-comments-when-minifying-javascript-using-yuicompressor