Last active
June 19, 2016 03:28
-
-
Save aloerina01/457463f4a4834f80a732defefeab8352 to your computer and use it in GitHub Desktop.
画像圧縮のためのタスク
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); // インストールしたgulpを呼び出す | |
var imagemin = require('gulp-imagemin'); // インストールした画像圧縮タスクを呼び出す | |
gulp.task('imageminTask', function() { // 「imageminTask」と名付けてタスクを登録する | |
gulp.src('images/*.png') // imagesフォルダ以下のpng画像を取得する | |
.pipe(imagemin()) // 画像の圧縮処理タスクを実行する | |
.pipe(gulp.dest('minified_images/')); // minified_imagesフォルダ以下に保存する | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment