Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 1 | const gulp = require('gulp'); |
| 2 | const browserSync = require('browser-sync'); |
| 3 | const spa = require('browser-sync-spa'); |
| 4 | |
| 5 | const browserSyncConf = require('../conf/browsersync.conf'); |
| 6 | const browserSyncDistConf = require('../conf/browsersync-dist.conf'); |
| 7 | |
| 8 | browserSync.use(spa()); |
| 9 | |
| 10 | gulp.task('browsersync', browserSyncServe); |
| 11 | gulp.task('browsersync:dist', browserSyncDist); |
| 12 | |
| 13 | function browserSyncServe(done) { |
| 14 | browserSync.init(browserSyncConf()); |
| 15 | done(); |
| 16 | } |
| 17 | |
| 18 | function browserSyncDist(done) { |
| 19 | browserSync.init(browserSyncDistConf()); |
| 20 | done(); |
| 21 | } |