From 92ec206de84389d4acd790e5011b91eb18cdbd2d Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 27 Sep 2016 16:51:36 +0100 Subject: [PATCH] Improved 'build all' script --- scripts/npm-build-all.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/npm-build-all.sh b/scripts/npm-build-all.sh index 40c2f6c32a..82e07b5bbf 100755 --- a/scripts/npm-build-all.sh +++ b/scripts/npm-build-all.sh @@ -2,6 +2,14 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +build_project() { + cd $1 + echo "====== build project: $2 =====" + npm update + npm install --cache-min 9999999 + npm run build +} + for PACKAGE in \ ng2-alfresco-core \ ng2-activiti-form \ @@ -18,9 +26,7 @@ for PACKAGE in \ ng2-activiti-analytics do DESTDIR="$DIR/../ng2-components/${PACKAGE}" - echo "====== build components : ${PACKAGE} =====" - cd "$DESTDIR" - npm update - npm install --cache-min 9999999 - npm run build + build_project $DESTDIR $PACKAGE done + +build_project "$DIR/../demo-shell-ng2" "Demo Shell"