generator-gulp-angular
generator-gulp-angular copied to clipboard
Add Browsersync options to scripts task
Right now, when not using a js preprocessor, the page is refreshed multiple times in a short time. I'm using Django on the backend and the local server hangs for a long time because of the multiple reloads (its faster to kill it and restart it). This is very noticeable when there are more than 30 js files.
This PR would fix this problem and possibly #1067.
A filter is also provided to only reload the changed script and stop unwanted files from being reloaded. I did this so that I can inject a controller instead of refreshing the browser. The way I pass the changed file is a little ugly, so if you want I can exclude it from the PR.