I failed to run node-sass
(node module), where I was able to setup path for input extensions.scss
files and output files generated after compiling to dist/
folder.
Now, I am using vscode extension live sass compiler
,
at bottom bar, when I clicked Watched Sass
then it compiled automatically scss
file to css
but in same folder.
main.scss
is compiled to main.css
.
problem is that I wanted to create that compiled css
file in other folder .i.e. in output folder ./dist/
.
I have manually created main.css
file in ./dist/folder
.
How can I setup path to source and destination files in that extension?
In VS Code, go to “Code > Preferences > Settings > User > Extensions > Edit in settings. json” for change the global settings. If you just wanna change the settings in the current workspace, go to “Code > Preferences > Settings > Workspace > Extensions > Edit in settings. json” for change the workspace settings.
Sass works by writing your styles in . scss (or . sass) files, which will then get compiled into a regular CSS file. The newly compiled CSS file is what gets loaded to your browser to style your web application.
I have had the same issue when I started implementing SMACSS methodology to my projects. This is the solution I have tried. hope it will help you.
Go to VScode User Settings --> Select "Live Sass Compiler Config --> add
"liveSassCompile.settings.formats": [{ "format": "expanded", "extensionName": ".css", "savePath": "./css" }]
Go to VScode menu- file>preferences>settings>extension>live sass copile config>edit in settings.json
and paste it code >>
"liveSassCompile.settings.formats": [ { "format": "expanded", "extensionName": ".css", "savePath": "~/../css/" } ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With