5

I'm using Koala for Win64 to compile sass (with lot of partials) to css with no problems, but Koala auto compile function is only runs when there are updates in root scss file, so I need to open Koala and press 'compile' button every time when I made changes to included partials.

Is there any way to configure scss auto compile to watch for changes in sass partials?

1
  • I'm using Koala and it compiles on partials by default, no problems whatsoever.
    – Cthulhu
    Mar 14, 2016 at 10:43

2 Answers 2

8

So came across this as I was having problems myself. Just documenting...

1st thing I did

was to create a style.scss or global.scss (making sure to setup "Auto Compile" in Koala) and only fill it with imports:

@import 'layout'; //_layout.scss
@import 'layout_modules'; // _layout_modules.scss
@import 'modules'; // _modules.scss
@import 'theme'; // _theme.scss

When I would work on the partials (partials will have a _ in front of the filename) and save I would get an autocompile confirmation (Koala Settings > General > "Notification when compile is completed")

But _layout_modules.scss would not trigger autocompile on save. If I switched over to another partial and saved, it would autocompile and Koala would still throw helpful errors for _layout_modules.scss.

2nd thing I did

then, was to remove the extra underscore in the filename - so it would just be _layoutmodules.scss (make sure to update your @import on style.scss) and worked as expected.

(I've been using Sass for all of 5 days.)

1
  • I'm not sure if Koala still does this, but I use Compass now on a Mac and it doesn't care if I use multiple underscores to name my partials. Also, PRO TIP: look up "Sass Globbing", will save you tons of time writing imports.
    – Phil Tune
    Aug 29, 2017 at 18:22
1

Short answer: add _ before partial files and import them to the main file.

Thanks to @philtune

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.