Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Gulp: Browser Sync Task
/**
* Browser Sync
*
* Asynchronous browser syncing of assets across multiple devices!! Watches for changes to js, image and php files
* Although, I think this is redundant, since we have a watch task that does this already.
*/
gulp.task('browser-sync', function() {
var files = [
'**/*.php',
'**/*.{png,jpg,gif}'
];
browserSync.init(files, {
// Read here http://www.browsersync.io/docs/options/
proxy: url,
// port: 8080,
// Tunnel the Browsersync server through a random Public URL
// tunnel: true,
// Attempt to use the URL "http://my-private-site.localtunnel.me"
// tunnel: "ppress",
// Inject CSS changes
injectChanges: true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment