Skip to content

Instantly share code, notes, and snippets.

@nezarfadle
Last active August 30, 2017 10:10
Show Gist options
  • Save nezarfadle/581a5174425941001bfc528e254b3d6e to your computer and use it in GitHub Desktop.
Save nezarfadle/581a5174425941001bfc528e254b3d6e to your computer and use it in GitHub Desktop.
npm install browser-sync gulp --save-dev
var gulp        = require('gulp');
var browserSync = require('browser-sync').create();

gulp.task('reload', function (done) {
    browserSync.reload();
    done();
});


gulp.task('default', ['reload'], function () {

    browserSync.init({
        server: {
            baseDir: "./"
        }
    });

    gulp.watch("./**/*.html", ['reload']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment