#!/bin/sh
rm -rf node_modules
rm -f package-lock.json
npm install uglify-js
version=`grep '"version":' node_modules/uglify-js/package.json  | sed -e 's;.*: ";;' -e 's;".*;;'`
date=`date '+%Y%m%d'`
tar cvf - node_modules | gzip -9 >uglifyjs-$version-$date.tar.gz
rm -rf node_modules
rm -f package-lock.json
