简体   繁体   English

当设置为 null 时,liveSassCompile.settings.savePath 在包含 css 的各种文件夹中生成 css 为什么? 如何停止这样做

[英]liveSassCompile.settings.savePath when set to null generate css in various folder that contains css why? how to stop from doing that

I want to only watch the scss on the folder I am current on, because not all projects I work the scss on the same folder so I can't specify savePath to a particular path.我只想在我当前所在的文件夹上观看 scss,因为并非我在同一文件夹上工作的所有项目都使用 scss,因此我无法将 savePath 指定到特定路径。

I am trying to use liveSassCompile extension on Visual studio code, with wordpress which contains css in various place, when I set the path of the liveSassCompile.settings.savePath to "/" it generates to css in the root of the project, so I have to delete all the extra css then I change the liveSassCompile.settings.savePath to null first time saving only creates on the exact folder I want but when switch projects it generates multiples css again.我正在尝试在 Visual Studio 代码上使用 liveSassCompile 扩展,wordpress 在不同的地方包含 css,当我将 liveSassCompile.settings.savePath 的路径设置为“/”时,它会在项目的根目录中生成 css,所以我必须删除所有额外的 css 然后我将 liveSassCompile.settings.savePath 更改为 null 第一次保存只在我想要的确切文件夹上创建但是当切换项目时它再次生成倍数 css。

If you have the same settings for every project you will EVER use then you can change your user settings.如果您对每个将使用的项目都有相同的设置,那么您可以更改您的用户设置。

按 F1 并输入用户设置。这个菜单会弹出

If you choose the UI you can select to change the default below如果您选择用户界面,您可以 select 更改下面的默认值

扩展设置的用户界面


Like every extension, it has default settings.像每个扩展一样,它有默认设置。 If you don't change them in the project/user settings then this is what the extension will conform to (in this case, saving to the same place as the original file - if you're using my version ).如果您不在项目/用户设置中更改它们,那么这就是扩展将符合的内容(在这种情况下,保存到与原始文件相同的位置 - 如果您使用的是我的版本)。

Default默认

{
    "liveSassCompile.settings.formats": [
        {
            "format": "expanded",
            "extensionName": ".css",
            "savePath": null,
            "savePathReplacementPairs": null
        }
    ],
    // Other settings ...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM