df8c054819
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
16 lines
386 B
JavaScript
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 }));
|
|
|
|
});
|