Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Last active June 19, 2020 19:27
Show Gist options
  • Save marklchaves/a2a9617ae6851cf6065e8b39b6dac969 to your computer and use it in GitHub Desktop.
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
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