simplyCopy.js 723 B

123456789101112131415161718192021222324
  1. var gulp = require('gulp');
  2. var gutil = require('gulp-util');
  3. var path = require('path');
  4. var config = require('../config');
  5. var renameSrcToDest = require('../lib/rename-src-to-dest');
  6. /*
  7. * Simple copy task - just copoes files from the source to the destination,
  8. * with no compilation, minification, or other intelligence.
  9. */
  10. var simpleCopyTask = function(glob) {
  11. return function() {
  12. var sources = config.apps.map(function(app) {
  13. return path.join(app.sourceFiles, app.appName, glob);
  14. });
  15. return gulp.src(sources, {base: '.'})
  16. .pipe(renameSrcToDest())
  17. .pipe(gulp.dest('.'))
  18. .on('error', gutil.log);
  19. };
  20. };
  21. module.exports = simpleCopyTask;