Just commit all of family home before editing 'cause i just accidentally overwrote gaeastohuaosneuh
This commit is contained in:
parent
18bba535b4
commit
84de7930cb
64 changed files with 15325 additions and 0 deletions
35
web/themes/custom/geofresco/gulp-tasks/compress.js
Normal file
35
web/themes/custom/geofresco/gulp-tasks/compress.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*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'));
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue