避免编译 CSS 格式的 LESS 文件
我的项目文件夹中有一些 .less 文件。 我使用PHPStorm,它可以自动编译CSS格式的.less
文件。
因为我必须将其中一些 .less
文件导入到主 less
文件中,所以我不希望将它们编译为单个 CSS 文件;相反,我只希望将其他 .less
文件导入其中的 main.less
文件编译为 CSS 文件,以便我可以将其添加到页面中。
例如在 SCSS 中,为此我们在文件名的开头添加下划线;那么该 SCSS 文件将无法再次编译。
我也尝试在 LESS 中使用这种方式,但没有成功。
I have some .less
files in a folder of my project.
I use PHPStorm, and it can automatically compile the .less
files in CSS format.
Because I have to import some of these .less
files into the main less
file, I don't want them to be compiled as a single CSS file; instead, I just want the main.less
file that I imported the other .less
files into it, to compile in a CSS file so I can add it to a page.
For instance in SCSS, for this purpose we add an underscore at the beginning of the file name; then that SCSS file won't compile again.
I tried to use this way in LESS, too but it didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论