mybuddy/gulpfile.js/tasks/extras.js

32 lines
728 B
JavaScript
Raw Normal View History

2017-08-21 20:03:16 +00:00
var gulp = require('gulp');
var flatten = require('gulp-flatten');
2017-08-21 20:03:16 +00:00
var pump = require('pump');
var extrasConfig = require('../config.js').extrasConfig;
gulp.task('extras', ['extras:fonts', 'extras:images', 'extras:root']);
2017-08-21 20:03:16 +00:00
gulp.task('extras:fonts', function(cb) {
pump([
gulp.src(extrasConfig.fonts.files),
2017-08-21 20:03:16 +00:00
gulp.dest(extrasConfig.fonts.dest)
], cb);
});
gulp.task('extras:images', function(cb) {
pump([
gulp.src(extrasConfig.images.files),
flatten({ subPath: 3 }),
gulp.dest(extrasConfig.images.dest)
], cb);
});
gulp.task('extras:root', function(cb) {
pump([
gulp.src(extrasConfig.root.files),
gulp.dest(extrasConfig.root.dest)
], cb);
});