glenn2223/vscode-live-sass-compiler

Compile all SCSS files to a single css file in a different folder?

lustremedia opened this issue · 3 comments

Hi Glen,
Thank you a lot for your scss compiler. At the moment I am facing an issue and I am not sure if it is possible to resolve.

I have a folder with a bunch of _partial.scss files and one single style.scss in a /scss folder.
Now I want to compile a style.css file on ../css

I also want to recompile style.css whenerver I change anything on the partial files. Is that somehow possible?

Folder structure for better visualization:

-- /scss
--- _partial.scss
--- _partial1.scss
--- _partial1.scss
--- style.scss (only imports here)
-- /css
--- style.css (compile this from style.scss, but style.scss never changes only through partials.scss changes)
--- style.min.css
--- style.map

Could you give me a sample config that would make that work?

By default files leading with an underscore are treated as partials so the only setting you'd need for that output is:

{
    "liveSassCompile.settings.formats": [
        {
            "savePathReplacementPairs": { "/scss/": "/css/" }
        }
    ]
}

Ah perfect, just had to adjust the exclude list as well. Thanks a bunch!

Ok my issue is resolved!