You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

  1. /*******************************
  2. Build Task
  3. *******************************/
  4. var
  5. gulp = require('gulp'),
  6. // gulp dependencies
  7. chmod = require('gulp-chmod'),
  8. gulpif = require('gulp-if'),
  9. print = require('gulp-print').default,
  10. // config
  11. config = require('../config/user'),
  12. tasks = require('../config/tasks'),
  13. // shorthand
  14. globs = config.globs,
  15. assets = config.paths.assets,
  16. output = config.paths.output,
  17. source = config.paths.source,
  18. log = tasks.log,
  19. {series, parallel} = gulp,
  20. buildAssets
  21. ;
  22. buildAssets = function(callback) {
  23. console.info('Building assets');
  24. // copy assets
  25. return gulp.src(source.themes + '/**/assets/**/*.*')
  26. .pipe(gulpif(config.hasPermission, chmod(config.permission)))
  27. .pipe(print(log.created))
  28. .pipe(gulp.dest(output.themes))
  29. ;
  30. };
  31. /* Export with Metadata */
  32. buildAssets.displayName = 'build-assets';
  33. buildAssets.description = 'Builds all assets';
  34. module.exports = series(buildAssets);