Reputation: 1
I have my styles organized in rails project as follows.
|-stylesheets
|--styles
|----file1.scss
|----file2.scss
|-application.css.scss
|-main.scss
In my application.css.scss file, i configured to pull only main.scss file so i can use the sass mixins and variables globally across other scss files inside styles folder
*= require_self
*= require main
I have used main.scss file to use the @import rule to import the scss files from the styles folder like
@import "styles/file1.scss"
@import "styles/file2.scss"
@import "styles/file3.scss"
etc...
So the main.scss file only contains imports
This has helped me to use the scss mixins and variables across the scss file.
The Problem is whenever i make changes to the files inside the styles folder or any other files that are imported in main the assets are not rebuild. The asset pipeline is only looking for the changes done in main.scss file and not the files that are imported. So i have to make changes in main.scss like add or remove a space and save to rebuild/recompile the scss files.
Can anyone tell me the workaround for this. I want to able to recompile/rebuild the assets when any of the included scss file changes.
Thanks in advance.
PS: I am new to rails
Upvotes: 0
Views: 133
Reputation: 276
Try installing https://github.com/guard/guard-livereload
Try installing https://github.com/guard/guard-livereload
Upvotes: 0