Last active
August 29, 2015 14:17
-
-
Save luxiaojian/0531cc89379ef9f23a7a to your computer and use it in GitHub Desktop.
gulp plugin
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 browserSync=require('browser-sync'); | |
var reload = browserSync.reload; | |
gulp.task('browser-sync', function() { | |
browserSync.init({ | |
server: { | |
baseDir: '/', | |
routes: { | |
"/bower_components": "bower_components" | |
} | |
} | |
}); | |
}); |
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
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