rgb*_*ife 10 comments compilation save less preserve
我正在使用CodeKit来开发WordPress主题.当然,我想在编译成CSS时压缩LESS,但是uglify.js会删除所有注释.
有谁知道如何标记特定的保留评论?
All*_*rgi 13
在评论之后立即加上一个感叹号,以便在缩小之后保留感叹号.你应该使用这样的东西:
/*!
this comment will not be removed by minifiers
*/
Run Code Online (Sandbox Code Playgroud)
以上答案不再有效!事情发展!
现在你应该在下面的@texelate中提到@preserve或添加@license注释.
小智 5
您可以这样使用: --comments '/foo|bar/' :将只保留包含“foo”或“bar”的注释。查看更多:https : //github.com/mishoo/UglifyJS2#keeping-copyright-notices-or-other-comments
| 归档时间: |
|
| 查看次数: |
6921 次 |
| 最近记录: |