Skip to content

Instantly share code, notes, and snippets.

@luxiaojian
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxiaojian/0531cc89379ef9f23a7a to your computer and use it in GitHub Desktop.
Save luxiaojian/0531cc89379ef9f23a7a to your computer and use it in GitHub Desktop.
gulp plugin
var browserSync=require('browser-sync');
var reload = browserSync.reload;
gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir: '/',
routes: {
"/bower_components": "bower_components"
}
}
});
});
gulp.task('default', ['browser-sync', 'css', 'js', 'wiredep', 'html', 'img'], function() {
// 观察改动
gulp.watch([
]).on('change', reload);
gulp.watch('source/css/**/*.css', ['css']);
gulp.watch('bower.json', ['wiredep']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment