Skip to content

Commit

Permalink
gulp: add browser task for dist dir
Browse files Browse the repository at this point in the history
I'm not actually using browser-sync for dist/ builds, but it's easier to
use the same server for both, and get the same open-browser-tab behavior.
  • Loading branch information
bergey committed Nov 19, 2014
1 parent 6c889af commit 5ce6453
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ gulp.task("browser-sync", function() {
});
});

gulp.task("browser-sync-dist", function() {
browserSync({
server: {
baseDir: "./dist",
},
browser: "chromium",
startPath: prefix
});
});

gulp.task("copy", function() {
gulp.src("data/**/*").pipe(gulp.dest(build + "data/"));
gulp.src("data/**/*").pipe(gulp.dest(dist + "data/"));
Expand All @@ -141,4 +151,6 @@ gulp.task("dist", function(cb) {
cb);
});

gulp.task("dist-watch", ["dist", "browser-sync-dist"]);

gulp.task("default", ["watch"]);

0 comments on commit 5ce6453

Please sign in to comment.