csssassprepros

Prepros: Watching all files but compile only main


I have a problem with Prepros configuration.

I want to watch for changes in all *.scss files in my project, but I want to compile only the style.css file.

enter image description here

Content of style.scss:

@import "_bootstrap";
@import "_bootstrap-compass.scss";
@import "_bootstrap-mincer.scss";
@import "_bootstrap-sprockets.scss";

I managed to configure my main file scss/style.scss to compile to file style.css. Compilation works ok. But I don't want to do that manually, everytime I make a change in some file.

Is there a way to watch for changes in all *.scss files? And when a change occurs, is there a way to tell Prepros to trigger style.scss compilation?


Solution

  • Try removing the underscore characters and .scss file extensions from your @imports, save the file & reload prepros.

    @import "_bootstrap-compass.scss";
    

    will become

    @import "bootstrap-compass";
    

    I find that if I have my projects set up like this it somehow works more reliably, but that being said it's supposed to work either way. The file watcher is meant to compile your main stylesheet whenever any included files are updated.

    If that doesn't work I'd recommend removing the project and adding it again (be sure to delete the config file in the project folder), then restarting Prepros.