ritwickdey / vscode-live-sass-compiler

Compile Sass or Scss file to CSS at realtime with live browser reload feature.
https://ritwickdey.github.io/vscode-live-sass-compiler/
MIT License
657 stars 168 forks source link

Settings Question: watching Scss with imports #292

Open Igcorreia opened 4 years ago

Igcorreia commented 4 years ago

Hi I have a custom setup like:

/css/general.scss

and on that file I have:

@import './utilities/utilities'; @import './theme/variables';

in the index.html I am loading: /css/general.css

In order to automatically generate the css files, if I make a change in the variables file I need to also save the general file.

Is there a way to make the extension detect the imports and watch sub folders?

davidpetrey commented 4 years ago

I think I'm having the same problem. My partial is not being watched for some reason.

glenn2223 commented 4 years ago

The extension is set up to only consider files as partials when they start with an underscore i.e. "c:/project/path/partials/no-leading-underscore.scss" isn't a known partial but "c:/project/path/partials/_partial.scss" is. Once a partial file is saved it will compile all files in the project (according to your specified settings).

I take it you've had to add the utilities folder as an excluded path in your settings, to stop it from compiling them?

If my assumptions are wrong, can you please forward a screenshot of your folder structure, plus a copy of your settings

davidpetrey commented 4 years ago

It compiled both the style.scss and _partial.scss  fine when I made a change in style.scss but not when I changed _partial.scss.  When I change my partial is says change detected but does not do anything.

I don't know anything about the utilities folder.

Dave Petrey

On Friday, May 8, 2020, 03:30:33 PM CDT, Glenn <notifications@github.com> wrote:  

The extension is set up to only consider files as partials when they start with an underscore i.e. "c:/project/path/partials/no-leading-underscore.scss" isn't a known partial but "c:/project/path/partials/_partial.scss" is. Once a partial file is saved it will compile all files in the project (according to your specified settings).

I take it you've had to add the utilities folder as an excluded path in your settings, to stop it from compiling them?

If my assumptions are wrong, can you please forward a screenshot of your folder structure, plus a copy of your settings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Vinnie442 commented 4 years ago

same thing here my partial isnt being watched and idk why... my partial isn in a folder css like my main style.scss and i import it in there. No errors detected.

image

nikkione commented 4 years ago

same thing here my partial isnt being watched and idk why... my partial isn in a folder css like my main style.scss and i import it in there. No errors detected.

image

hello, check if workplace you are working with are your ROOT workplace (simply drag it on top of your list), thats woks for me, after i tried all the possible ways i found in here;) hope it helps

davidpetrey commented 4 years ago

Ok I'll try that. I usually work with multi-root folders so maybe that is the issue. Just weird that it works but not for partials.

Vinnie442 commented 4 years ago

same thing here my partial isnt being watched and idk why... my partial isn in a folder css like my main style.scss and i import it in there. No errors detected. image

hello, check if workplace you are working with are your ROOT workplace (simply drag it on top of your list), thats woks for me, after i tried all the possible ways i found in here;) hope it helps

Tried it, doesnt work unfortunately :(

flama90 commented 4 years ago

I have the same issue, when I edit and save a _partial.scss file don't compile. I need to go to the main style.scss file and save