Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup output path to compiled css files using `vscode live sass compiler extension` in windows10?

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.

enter image description here

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?

like image 471
GD- Ganesh Deshmukh Avatar asked Aug 05 '18 17:08

GD- Ganesh Deshmukh


People also ask

How do I customize my live Sass compiler in Vscode?

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.

How does Sass get compiled?

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.


2 Answers

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.

enter image description here

Go to VScode User Settings --> Select "Live Sass Compiler Config --> add

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

enter image description here

like image 113
sulara.perera Avatar answered Sep 19 '22 20:09

sulara.perera


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/"     }   ] 
like image 29
user13419933 Avatar answered Sep 20 '22 20:09

user13419933