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