if [ -d "${HOME}/.nvm/" ]
then
  . ${HOME}/.nvm/nvm.sh
fi

echo "开始压缩 ./img/ 下的所有png图片"

nvm use v10.15.0
npm config delete registry -g
npm config delete registry
npm i
cd img
../node_modules/.bin/super-tinypng

echo "压缩完毕"