ijs / webp-webpack-plugin

webpack plugin for making webp format file
https://ijs.github.io/webp-webpack-plugin/
MIT License
40 stars 7 forks source link

test filetype before convert #6

Closed shenzhim closed 6 years ago

shenzhim commented 6 years ago

please update npm package

codecov-io commented 6 years ago

Codecov Report

Merging #6 into master will increase coverage by 0.09%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
+ Coverage   98.38%   98.48%   +0.09%     
==========================================
  Files           2        2              
  Lines          62       66       +4     
==========================================
+ Hits           61       65       +4     
  Misses          1        1
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a416477...aae4119. Read the comment docs.

jiangtao commented 6 years ago

Thanks for your pr. The tool sharp can transforme jpg, jpeg, png. Use the match options can satisfy your demand. I will fix it use another way instead of file-type check for performance.

jiangtao commented 6 years ago

I add checkStrict option for your way to check the image. You alse can use match option when checkStrict is default false.