leidottw / gulp-pngquant

MIT License
9 stars 2 forks source link

Skip non-PNG files #3

Open sughodke opened 6 years ago

sughodke commented 6 years ago

It would help to have a bypass for non-PNG files, e.g. SVG files should be piped through to the destination un-altered. Right now, non-PNGs files come out the other side as empty files.

Made it work locally by added a quick check to index.js.

   if (!String(file.relative).includes('.png')) {
      console.log('skipping ' + file.relative);
   }
   else { ...