Make use of flatten-packages when distributing

This commit is contained in:
Juan Cruz Viotti 2015-02-26 11:17:11 -04:00
parent 980e55afd3
commit de400614ea

View File

@ -9,6 +9,13 @@ PACKAGE_JSON=`cat package.json`
VERSION=$(parse_json "$PACKAGE_JSON" version)
NAME=$(parse_json "$PACKAGE_JSON" name)
if [ -z flatten-packages ]; then
echo "Missing flatten-packages npm module."
echo "Install it with:"
echo " $ npm install -g flatten-packages"
exit 1
fi
function print_banner() {
local message=$1
@ -40,6 +47,7 @@ function distribute() {
cd build/$package
RESIN_BUNDLE=$os npm install --production --force
flatten-packages .
cd ..