如何使用Live Sass Compiler将所有scss编译为style.css?

发布于 2025-01-12 09:31:30 字数 421 浏览 4 评论 0原文

我在 /scss 文件夹中有大约 50 个 scss 文件。当我编辑它们时,我需要将其编译为 root 中的一个 style.css 。我到底需要在设置中添加什么?

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

这不起作用

我需要这个:

在此处输入图像描述

I have around 50 scss files in folder /scss. When im editing them i need compile it to one style.css with is in root. What exactly i have to add to settings?

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

This not works

I need this:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月流歌 2025-01-19 09:31:30
 "liveSassCompile.settings.formats":[
    // This is Default.
    {
        "format": "expanded",
        "extensionName": ".css",
        "savePath": null
    },
    // You can add more
    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "/dist/css"
    },
    // More Complex
    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "~/../css/"
    }
]
 "liveSassCompile.settings.formats":[
    // This is Default.
    {
        "format": "expanded",
        "extensionName": ".css",
        "savePath": null
    },
    // You can add more
    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "/dist/css"
    },
    // More Complex
    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "~/../css/"
    }
]
¢好甜 2025-01-19 09:31:30

该扩展不是打包工具。您需要一个用于导入所有文件的 style.scss 文件。类似于下面的内容

@import './path/file1.scss';
@import './path/file2.scss';
@import './path/file3.scss';

或者,看看是否可以使用 webpack

The extension is not a packing tool. You need a style.scss file that imports all of your files. Something like the below

@import './path/file1.scss';
@import './path/file2.scss';
@import './path/file3.scss';

Alternatively, see if webpack can be used

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文