kopia lustrzana https://github.com/wagtail/wagtail
27 wiersze
762 B
JavaScript
27 wiersze
762 B
JavaScript
var gulp = require('gulp');
|
|
var rename = require('gulp-rename');
|
|
var gutil = require('gulp-util');
|
|
var path = require('path');
|
|
var config = require('../config');
|
|
var renameSrcToDest = require('../lib/rename-src-to-dest');
|
|
|
|
/*
|
|
* Simple copy task - just copoes files from the source to the destination,
|
|
* with no compilation, minification, or other intelligence
|
|
*
|
|
*/
|
|
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);
|
|
};
|
|
};
|
|
|
|
module.exports = simpleCopyTask;
|