Last active
August 29, 2015 14:14
-
-
Save cikoriicabachkov/08e966e4131477f1f24f to your computer and use it in GitHub Desktop.
Simple livereload server (gulp + browser-sync)
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
// Quick start guide | |
// 1) install node.js, npm | |
// 2) run command: npm install gulp browser-sync | |
// 3) run command: gulp | |
// 4) ????? | |
// 5) PROFIT | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
// set root dir and files to watch only | |
var baseDirPath = "./sp-right/", | |
watchedFiles = ["./sp-right/css/*.css", "./sp-right/js/*.js", "./sp-right/*.html"]; | |
gulp.task('browser-sync', function() { | |
browserSync.init(watchedFiles, { | |
server: { | |
baseDir: baseDirPath | |
} | |
}); | |
}); | |
gulp.task('default', ['browser-sync'], function () { | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment