Skip to content

Instantly share code, notes, and snippets.

@ringoluo
Last active August 29, 2015 14:15
Show Gist options
  • Save ringoluo/9d8ad543fd4f9c6c3f12 to your computer and use it in GitHub Desktop.
Save ringoluo/9d8ad543fd4f9c6c3f12 to your computer and use it in GitHub Desktop.
Gulp+BrowserSync
var gulp = require('gulp');
var browserSync = require('browser-sync');
gulp.task('browser-sync', function() {
browserSync.init(['./*.html'], {
server: {
baseDir: "./"
}
});
});
gulp.task('default', ['browser-sync']);
1. install gulp and browser-sync
$ npm install browser-sync gulp --save-dev
2. create gulpfile.js
3. start server
$ gulp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment