diff --git a/helpers/export-zip.sh b/helpers/export-zip.sh new file mode 100755 index 000000000..087cc0295 --- /dev/null +++ b/helpers/export-zip.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + +create_zip () { + echo "Parameter #1 is $1" + cd "$SCRIPTPATH" + cd $1 + zip -r $2 . -x ".*" -x "__MACOSX" + mv $2 ../../_tmp/ +} + +# -- svg and png -- +create_zip ../color/svg/ openmoji-svg-color.zip +create_zip ../color/72x72/ openmoji-72x72-color.zip +create_zip ../color/618x618/ openmoji-618x618-color.zip + +create_zip ../black/svg/ openmoji-svg-black.zip +create_zip ../black/72x72/ openmoji-72x72-black.zip +create_zip ../black/618x618/ openmoji-618x618-black.zip + +# -- fonts -- +cd "$SCRIPTPATH" +cd ../font +zip openmoji-font.zip OpenMoji-Black.ttf OpenMoji-Color.ttf openmoji.css demo.html -x ".*" -x "__MACOSX" +mv openmoji-font.zip ../_tmp/ diff --git a/package.json b/package.json index 6d921ff65..3d9103fbe 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "pretty-src-svg": "find src/ -type f -name '*.svg' -print0 | xargs -0 -n 1 -P 6 svgo --config helpers/beautify-svg.yml", "export-svg": "./helpers/export-svg.sh", "export-png": "./helpers/export-png.sh", - "export-svg-font": "node helpers/export-svg-font.js" + "export-svg-font": "node helpers/export-svg-font.js", + "export-zip": "./helpers/export-zip.sh" }, "engines": { "node": ">=8.15.0"