0

I use live sass compiler extension. so uptade css file when save scss file but every time I should resave main scss to apply changes. How can I apply changes after saving imported scss files at once.

one more question. is there any solution for automatically start "watch-sass" when opening workspace.

cihankaba
  • 7
  • 6
  • Sound like your using the `liveSassCompile.settings.includeItems` setting, to get just your one file output, is that right? Also, install my fork which has a setting to watch on launch - https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass – glenn223 Jul 04 '22 at 11:19
  • i already use this plugin but still can't find the setting I want – cihankaba Jul 19 '22 at 19:25
  • The other setting is `liveSassCompile.settings.watchOnLaunch` Ref: https://github.com/glenn2223/vscode-live-sass-compiler/blob/master/docs/settings.md#livesasscompilesettingswatchonlaunch – glenn223 Jul 20 '22 at 21:16
  • Thank you so much i got it done. I must admit it was actually very simple. So my other problem? When I save the scss file, the css file is updated but I need to save the css file. – cihankaba Jul 22 '22 at 16:48
  • Do your included files start with an underscore? If so saving them will save the main scss file. If not, you can either rename them or use the [`liveSassCompile.settings.partialsList`](https://github.com/glenn2223/vscode-live-sass-compiler/blob/master/docs/settings.md#livesasscompilesettingspartialslist) setting to specify that everything else is a partial – glenn223 Jul 23 '22 at 22:03
  • No no! i have 1 style.scss 1 style.css and 1 style.css.map that is all. So The css file is updated when I save the scss file but If I restart the style.css file than reverts to its previous state. To avoid this, I need to save the css file as well. – cihankaba Jul 25 '22 at 12:33
  • I don't understand what you mean by "`restart the style.css file`". The extension just compiles and saves the updated CSS file. – glenn223 Jul 26 '22 at 10:53
  • "The extension just compiles and saves the updated CSS file." Problem is right here!! extension is not saving style.css file. I have to save manually. – cihankaba Jul 27 '22 at 00:29
  • You shouldn't have to manually save the file, [this piece of code](https://github.com/glenn2223/vscode-live-sass-compiler/blob/master/src/FileHelper.ts#L18-L22) specifically saves the data to disk. You don't have anything else open that could be stopping the file from being saved to disk. There aren't any errors in the output window are there? Can you open an issue on the extension with an example project, maybe some screenshots or a video showing the issue. – glenn223 Jul 27 '22 at 21:06

0 Answers0