gpt4 book ai didi

Less File Watcher - 忽略某些文件

转载 作者:行者123 更新时间:2023-12-04 01:44:33 25 4
gpt4 key购买 nike

我在 WebStorms 中使用 Less.css File Watcher,我想排除特定文件进行编译。
我有一个包含所有其他 CSS 的 style.less 文件,应该只编译这个文件。我怎样才能做到这一点?

最佳答案

如果您需要文件观察器来观察单个 .less 中的变化仅文件,忽略其他 .less 中的所有更改文件,这可以使用范围来完成:

  • 在设置/范围中添加您的自定义范围,排除所需的文件/文件夹(有关更多信息,请参阅 Scopes (Phpstorm Help))。
  • 在设置/文件观察器中,打开 LESS 文件观察器设置并将“范围”属性值从“项目文件”更改为您的自定义范围。

  • 如果您需要更改所有正在观看的 less 文件,但只有一个 style.css生成将包括整个项目中所有 .less 文件的样式,在您的观察者设置中勾选“仅跟踪根文件”复选框。请参阅帮助中的说明:

    When the File Watcher is invoked on a file, Phpstorm detects all the files in which this file is included. For each of these files, in its turn, Phpstorm again detects the files into which it is included. This operation is repeated recursively until Phpstorm reaches the files that are not included anywhere within the specified scope. These files are referred to as root files (do not confuse with content roots).

    • When this check box is selected the File Watcher runs only against the root files.
    • When the check box is cleared, the File Watcher runs against the file from which it is invoked and against all the files in which this file is included recursively within the specified scope

    关于Less File Watcher - 忽略某些文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20195203/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com