Skip to content

Instantly share code, notes, and snippets.

View nariyu's full-sized avatar

Yusuke Narita nariyu

  • playwell inc.
  • Tokyo, JP
  • X @nariyu
View GitHub Profile
const PLUGIN_NAME = 'gulp-pngquant';
var through = require('through2');
var gutil = require('gulp-util');
var log = gutil.log;
var PluginError = gutil.PluginError;
var pngquant = require('pngquant');
module.exports = function (options) {
var stream = through.obj(function (file, enc, callback) {
if (file.isNull()) {