[英]Show warnings when extend() is missing base class?
I'm doing some class extensions in Less, but it's silently failing if the class I attempt to extend isn't found. 我在Less中进行了一些类扩展,但是如果找不到我尝试扩展的类,它会自动失败。 I'd really like to see a warning about that.
我真的很想看到一个警告。 Is there a way to enable it?
有办法启用它吗?
.foo {
&:extend(.bar); // .bar is undefined, fails silently
}
Less emits " extend
fails" warnings by default since v2.3.0
. 从
v2.3.0
,默认情况下Less发出“ extend
失败”警告。 Though by the time I'm writing this, only lessc
itself shows these warnings. 尽管在撰写本文时,只有
lessc
本身会显示这些警告。 Other tools (eg gulp-less
, grunt-contrib-less
etc., ie those that use the Less library programmatically) need to explicitly implement a dedicated support for such warnings (there was no "warnings-facility" in Less before) and so far none actually did this yet. 其他工具(例如,无
gulp-less
,无grunt-contrib-less
等,例如,以编程方式使用Less库的工具)需要显式实现对此类警告的专用支持(Less之前没有“警告功能”),因此到目前为止,实际上还没有人这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.