Last active
June 19, 2020 19:27
-
-
Save marklchaves/a2a9617ae6851cf6065e8b39b6dac969 to your computer and use it in GitHub Desktop.
Gulp File for Reloading Browser on Local by Flywheel WordPress PHP and CSS File Changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserSync = require('browser-sync').create(); | |
var reload = browserSync.reload; | |
gulp.task('serve', function () { | |
// Standard call for dynamic sites. | |
browserSync.init({ | |
proxy: "avada.local" | |
}); | |
// Watch PHP and CSS files. | |
gulp.watch("**/*.php").on("change", reload); | |
gulp.watch("**/*.css").on("change", reload); | |
}); | |
/** | |
* Place this file in "Local Sites/YOURSITENAMEHERE" | |
* Usage: gulp serve | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment