-
How do I configure the "settings.json" file of the local ".vscode" folder to keep the css directory structure equal to the scss directory structure? Example:
Currently I just get all the compiled css files to be saved in the same folder regardless of the directory structure of the source scss files!
My current code in the "settings.json" file is:
Thanks in advance for the help!!!! By the way, excellent work, thanks for sharing it with the Visual Code user community!!! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You want to take a look at Basically, any key that is found is replaced with the replacement value. The key is restricted to matching single folders - it's not a string replacement - so you can't have a key that's You'd want your settings to start with this instead: {
"liveSassCompile.settings.formats":[
{
"format": "expanded",
"extensionName": ".css",
"savePathSegmentKeys": [ "sass" ],
"savePathReplaceSegmentsWith": "css"
},
{
"format": "compressed",
"extensionName": ".min.css",
"savePathSegmentKeys": [ "sass" ],
"savePathReplaceSegmentsWith": "css"
}
],
// ETC, ETC P.s. thanks for opening the first discussion! 🎉 |
Beta Was this translation helpful? Give feedback.
-
I would really appreciate it if you could show me a complete example based on the following directory structure with 3 scss files:
SCSS Directory structure
How should I specify the code in the "settings.json" file to generate the css style files with the same scss directory structure, i.e.:
CSS Directory structure
Entire resulting directory
Entire resulting directory
I hope you can help me to configure the extension correctly... I'm sure this will serve as a guide for many users who may have the same doubt!!!! Thank you very much in advance! |
Beta Was this translation helpful? Give feedback.
-
Got it, it work great, tks a lot!!! Sorry I didn't catch it at first! |
Beta Was this translation helpful? Give feedback.
You want to take a look at
savePathSegmentKeys
andsavePathReplaceSegmentsWith
in theformat
setting (touched on in "save path notes")Basically, any key that is found is replaced with the replacement value. The key is restricted to matching single folders - it's not a string replacement - so you can't have a key that's
Folder 1/Folder2
.You'd want your settings to start with this instead: