Skip to content

Commit

Permalink
Added export zip helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
b-g committed May 15, 2019
1 parent 8b5b234 commit 156ebb2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions helpers/export-zip.sh
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 156ebb2

Please sign in to comment.