stackviz/gulp/tasks/data.js
Tim Buckley df8c054819 Add data gulp task.
This adds a new Gulp task to automatically include `app/data` in
dev builds if it exists. This directory will contain sample data
files for use during development and outputs them to `build/data`.
Additionally, this integrates with browser-sync and will
automatically reload open browsers as testing datasets are
changed.

Change-Id: Ie1578682d11e36bd6142b9d326f50a547aa4613b
2015-09-28 11:50:07 -06:00

16 lines
386 B
JavaScript

'use strict';
var config = require('../config');
var changed = require('gulp-changed');
var gulp = require('gulp');
var browserSync = require('browser-sync');
gulp.task('data', function() {
return gulp.src(config.data.src)
.pipe(changed(config.data.dest))
.pipe(gulp.dest(config.data.dest))
.pipe(browserSync.reload({ stream: true, once: true }));
});