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

/*eslint strict: ["error", "global"]*/
'use strict';
//=======================================================
// Include gulp
//=======================================================
var gulp = require('gulp');
//=======================================================
// Include Our Plugins
//=======================================================
var rename = require('gulp-rename');
var imagemin = require('gulp-imagemin');
// Export our tasks.
module.exports = {
// Compress svg/png/jpg files.
assets: function() {
return gulp.src([
'./src/{global,layout,components}/**/*{.png,.jpg,.svg}'
])
.pipe(imagemin({
progressive: true,
svgoPlugins: [{
removeViewBox: false
}]
}))
.pipe(rename(function (path) {
path.dirname = '';
return path;
}))
.pipe(gulp.dest('./dist/assets'));
}
};