UNPKG

generator-mc-d8-theme

Version:

Yeoman generator for creating Drupal 8 component based themes.

36 lines (32 loc) 720 B
'use strict'; // Include gulp const { src, dest } = require('gulp'); // Include Our Plugins const rename = require('gulp-rename'); const imagemin = require('gulp-imagemin'); // Export our tasks. module.exports = { // Compress svg/png/jpg files. compressAssets: function() { return src([ './src/patterns/{global,layout,components}/**/*{.gif,.png,.jpg,.svg}' ]) .pipe( imagemin({ progressive: true, svgoPlugins: [ { removeViewBox: false } ] }) ) .pipe( rename(function(path) { path.dirname = ''; return path; }) ) .pipe(dest('./dist/images')); } };