2015-06-04 18:44:08 +02:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var gutil = require('gulp-util');
|
|
|
|
var path = require('path');
|
|
|
|
var config = require('../config');
|
2016-04-21 23:31:50 +02:00
|
|
|
var renameSrcToDest = require('../lib/rename-src-to-dest');
|
2015-06-04 18:44:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Simple copy task - just copoes files from the source to the destination,
|
2020-02-12 15:45:20 +01:00
|
|
|
* with no compilation, minification, or other intelligence.
|
2015-06-04 18:44:08 +02:00
|
|
|
*/
|
|
|
|
var simpleCopyTask = function(glob) {
|
|
|
|
return function() {
|
|
|
|
var sources = config.apps.map(function(app) {
|
|
|
|
return path.join(app.sourceFiles, app.appName, glob);
|
|
|
|
});
|
|
|
|
|
|
|
|
return gulp.src(sources, {base: '.'})
|
|
|
|
.pipe(renameSrcToDest())
|
|
|
|
.pipe(gulp.dest('.'))
|
|
|
|
.on('error', gutil.log);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-07-09 13:36:34 +02:00
|
|
|
module.exports = simpleCopyTask;
|