I have started a new theme & I am using Gulp, Gulp-Sass & Node-Sass so far. I have just finished my Gulpfile.js & I have successfully gotten Gulp to recompile & watch my SASS files. Everytime I save my SASS files, gulp recompiles them & watches them, but ghost does not take the changes. I have to go into Ghost CLI & type ghost restart. Why is this?
Can you provide more information? How are you starting ghost? What ghost version are you using? What environment are you running in? What os are you using?
Starting Ghost : Ghost CLI - ghost start & when I want a SASS file change to take effect, I use ghost restart
Ghost version : Newest with Ghost CLI
Environment : Local
OS : Windows 10
Hmm, can you check if hard reloading (ctrl+shift+r) fixes the issue? I use browsersync with my theme and I’ve noticed that sometimes the styles are really wonky until I manually refresh or hard refresh.
It would seem that vikaspotluri123 solution to hard refresh the browser with ctrl+shift+r is what works right now. I am not going to mark it as a solution yet though, just in-case there is another option.
It sure beats having to restart ghost everytime though! Thanks vikaspotluri123
Did some quick investigation and it does seem like browser live reload is not working on themes even with livereload enabled and always needs a manual refresh for changes to show up. Don’t think anything changed in Ghost to affect this, but will investigate further for what could be broken here.
The asset helper adds a param which caches the file and that is what we are changing by restarting.
I checked it incognito and on another device and the old param is on the asset, one of these devices never saw that stylesheet and still recieved cached version.
If i just use a link with no param aka no asset helper it reloads as expected, bc gulp is reloading the file, but ghost isn’t updating the asset.
Edit: oops this thread is 2 years old I thought it was 2 months old. I may revise this into it’s own new thread tomorrow at work.