Skip to content

Commit

Permalink
moving from gulp-image to gulp-imagemin
Browse files Browse the repository at this point in the history
  • Loading branch information
Granze committed Nov 20, 2015
1 parent b0bd169 commit f029ffc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions gulpfile.babel.js
Expand Up @@ -17,7 +17,8 @@ import vars from 'postcss-simple-vars';
import extend from 'postcss-simple-extend';
import cssnano from 'cssnano';
import htmlReplace from 'gulp-html-replace';
import image from 'gulp-image';
import imagemin from 'gulp-imagemin';
import pngquant from 'imagemin-pngquant';
import runSequence from 'run-sequence';

const paths = {
Expand Down Expand Up @@ -88,8 +89,12 @@ gulp.task('htmlReplace', () => {

gulp.task('images', () => {
gulp.src(paths.srcImg)
.pipe(image())
.pipe(gulp.dest(paths.distImg));
.pipe(imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()]
}))
.pipe(gulp.dest(paths.distImg));
});

gulp.task('lint', () => {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -48,11 +48,12 @@
"gulp": "^3.9.0",
"gulp-eslint": "^1.0.0",
"gulp-html-replace": "^1.5.1",
"gulp-image": "^1.0.2",
"gulp-imagemin": "^2.4.0",
"gulp-notify": "^2.2.0",
"gulp-postcss": "^6.0.0",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.4.0",
"imagemin-pngquant": "^4.2.0",
"mocha": "^2.3.0",
"postcss-nested": "^1.0.0",
"postcss-simple-extend": "^1.0.0",
Expand Down

0 comments on commit f029ffc

Please sign in to comment.