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