How to compile all scss to style.css with Live Sass Compiler?

1.1k views Asked by At

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

2

There are 2 answers

2
Nasim Shabo On
 "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/"
    }
]
0
glenn223 On

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