Skip to content

Instantly share code, notes, and snippets.

@SheetJSDev
Last active October 10, 2019 20:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SheetJSDev/e2f904c6588789e453359e1b02004dae to your computer and use it in GitHub Desktop.
Save SheetJSDev/e2f904c6588789e453359e1b02004dae to your computer and use it in GitHub Desktop.
#!/bin/bash
set -o pipefail
UZIPVER=$(date "+0.%Y%m%d.0")
# Remove and re-clone
rm -rf UZIP.js
git clone https://github.com/photopea/UZIP.js/
cd UZIP.js
# Generate package.json
cat >package.json <<EOF
{
"name": "uzip",
"version": "${UZIPVER}",
"files": [ "LICENSE", "README.md", "UZIP.js", "package.json" ],
"main": "./uzip"
}
EOF
# Display files
npm pack
tar -tzf - < "uzip-${UZIPVER}.tgz"
# Publish
npm publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment