Last active
August 29, 2015 14:15
-
-
Save ringoluo/9d8ad543fd4f9c6c3f12 to your computer and use it in GitHub Desktop.
Gulp+BrowserSync
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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
gulp.task('browser-sync', function() { | |
browserSync.init(['./*.html'], { | |
server: { | |
baseDir: "./" | |
} | |
}); | |
}); | |
gulp.task('default', ['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
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