Drupal 8 Site using Vue
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.

35 lines
898 B

  1. /*eslint strict: ["error", "global"]*/
  2. 'use strict';
  3. //=======================================================
  4. // Include gulp
  5. //=======================================================
  6. var gulp = require('gulp');
  7. //=======================================================
  8. // Include Our Plugins
  9. //=======================================================
  10. var rename = require('gulp-rename');
  11. var imagemin = require('gulp-imagemin');
  12. // Export our tasks.
  13. module.exports = {
  14. // Compress svg/png/jpg files.
  15. assets: function() {
  16. return gulp.src([
  17. './src/{global,layout,components}/**/*{.png,.jpg,.svg}'
  18. ])
  19. .pipe(imagemin({
  20. progressive: true,
  21. svgoPlugins: [{
  22. removeViewBox: false
  23. }]
  24. }))
  25. .pipe(rename(function (path) {
  26. path.dirname = '';
  27. return path;
  28. }))
  29. .pipe(gulp.dest('./dist/assets'));
  30. }
  31. };