Search code examples
ionic-frameworksass

sass - how can I watch for changes on a folder, and, if it changed, compile a sass file outside of it?


I have a sass structure in which I have a folder containing Ionic scss files, and a parent scss file containing some variables. I need to compile the ionic scss files when the parent file is modified.

Is there a way to listen to one file's changes and, if it changed, compile another?


Solution

  • Import all your scss using @import in another scss file (let's say your main.scss) then watch the main.scss file. Any changes that you make on any of the files included will be compiled to your config file

    or you want separate compiled files?