New script to build components prior to running start.sh

- Add to start-linked.sh
This commit is contained in:
Will Abson
2016-07-28 10:24:00 +01:00
parent 77290442ba
commit f55b8938fa
2 changed files with 15 additions and 16 deletions

13
scripts/npm-build-all.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
components_dir="$DIR/../ng2-components"
for comp_dir in $( ls "$components_dir" ); do
echo $comp_dir
test -f "$components_dir/$comp_dir/package.json" && \
cd "$components_dir/$comp_dir" && \
npm run build
done
cd ${DIR}

View File

@@ -3,19 +3,5 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
"$DIR/npm-link-demo-shell.sh" "$DIR/npm-link-demo-shell.sh"
"$DIR/npm-build-all.sh"
cd "$DIR/../demo-shell-ng2" "$DIR/start.sh"
if [[ $1 = "-install" ]]; then
npm install
npm run start
elif [[ $1 = "-update " ]]; then
npm run update
npm run start
elif [[ $1 = "-cleanInstall" ]]; then
npm run clean
npm install
npm run start
else
npm run start
fi