删除LESS////编译注释 [英] Remove LESS // comments on compile
问题描述
是否可以将LESS配置为在通过JS编译时删除"//注释"?
Is it possible to configure LESS to remove "// comments" when it compiles via JS?
我想从输出的较少文件中删除它们.
I want to remove them from the outputted less file.
推荐答案
根据文档说明,较少的单行注释//
应该保持沉默:
Less' single-line comments //
are supposed to be silent, as per documentation states:
单行注释在LESS中也有效,但是它们是无声的",它们不会显示在已编译的CSS输出中:
Single-line comments are also valid in LESS, but they are ‘silent’, they don’t show up in the compiled CSS output:
// Hi, I'm a silent comment, I won't show up in your CSS
.class { color: white }
请访问LESS网站: http://lesscss.org/#-comments
See at LESS' website: http://lesscss.org/#-comments
-x
标志在命令行上工作,以输出缩小的CSS(它将去除CSS注释),但无论如何,css上不应出现双斜杠.请参阅命令行用法"主题上的 http://lesscss.org/#usage .
-x
flag works on command line to output minified CSS (which will strip CSS comments), but in any way, double slash shouldn't appear on css. See http://lesscss.org/#usage at 'Command-line usage' topic.
这篇关于删除LESS////编译注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!