Skip to content

Commit 30ade46

Browse files
pprincegreypants
authored andcommitted
Add Browser-Sync.
This replaces: serve and open tasks, livereload As of this commit, index.html is not served (because it isn't in build/).
1 parent 4d3d843 commit 30ade46

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: gulp/tasks/watch.js

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
var gulp = require('gulp');
22
var config = require('../config');
3+
var gulp = require('gulp');
4+
var browserSync = require('browser-sync');
35

46
gulp.task('watch', function() {
57
gulp.watch('src/sass/**', ['compass']);
68
gulp.watch('src/images/**', ['images']);
79
// Note: Javascript watching is handled by watchify
810
// in gulp/tasks/browserify.js, when this flag is true
911
config.isWatching = true;
12+
13+
browserSync.init(['build/**'], {
14+
server: {
15+
baseDir: 'build'
16+
}
17+
});
1018
});

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
}
2727
},
2828
"devDependencies": {
29+
"browser-sync": "~0.8.2",
2930
"browserify-shim": "~3.4.1",
3031
"browserify": "~3.36.0",
3132
"coffeeify": "~0.6.0",

0 commit comments

Comments
 (0)