mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
fix clean script and build all (#1758)
This commit is contained in:
parent
59ed4ee65d
commit
e8c524176e
@ -47,10 +47,16 @@ in the demo shell:
|
|||||||
./npm-buid-all.sh
|
./npm-buid-all.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* If you want to build all your local component and link it together and in the demo shell:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./npm-buid-all.sh -l or -link
|
||||||
|
```
|
||||||
|
|
||||||
* If you want to build all your local component and run the test:
|
* If you want to build all your local component and run the test:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./npm-buid-alll.sh -test
|
./npm-buid-alll.sh -t or -test
|
||||||
```
|
```
|
||||||
|
|
||||||
* If you want clean all your local component and the demo shell:
|
* If you want clean all your local component and the demo shell:
|
||||||
|
@ -2,54 +2,79 @@
|
|||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
eval RUN_TEST=false
|
eval RUN_TEST=false
|
||||||
|
eval RUN_LINK=false
|
||||||
|
|
||||||
|
eval projects=( "ng2-activiti-diagrams"
|
||||||
|
"ng2-activiti-analytics"
|
||||||
|
"ng2-activiti-form"
|
||||||
|
"ng2-activiti-processlist"
|
||||||
|
"ng2-activiti-tasklist"
|
||||||
|
"ng2-alfresco-core"
|
||||||
|
"ng2-alfresco-datatable"
|
||||||
|
"ng2-alfresco-documentlist"
|
||||||
|
"ng2-alfresco-login"
|
||||||
|
"ng2-alfresco-search"
|
||||||
|
"ng2-alfresco-tag"
|
||||||
|
"ng2-alfresco-upload"
|
||||||
|
"ng2-alfresco-viewer"
|
||||||
|
"ng2-alfresco-webscript"
|
||||||
|
"ng2-alfresco-userinfo" )
|
||||||
|
|
||||||
show_help() {
|
show_help() {
|
||||||
echo "Usage: npm-build-all.sh"
|
echo "Usage: npm-build-all.sh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "-t or -test build all your local component and run also the test on them"
|
echo "-t or -test build all your local component and run also the test on them"
|
||||||
|
echo "-l or -link link together the local component and link it also in the demo shell"
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_test(){
|
enable_test(){
|
||||||
RUN_TEST=true
|
RUN_TEST=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable_link(){
|
||||||
|
RUN_LINK=true
|
||||||
|
}
|
||||||
|
|
||||||
build_project() {
|
build_project() {
|
||||||
cd $1
|
cd $1
|
||||||
echo "====== build project: $2 ====="
|
echo "====== build project: $2 ====="
|
||||||
npm install
|
npm install
|
||||||
npm build
|
|
||||||
if $RUN_TEST == true; then
|
if $RUN_TEST == true; then
|
||||||
npm run test
|
npm run test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
npm run tsc
|
||||||
|
npm run build.umd
|
||||||
|
|
||||||
|
if $RUN_LINK == true; then
|
||||||
|
npm run travis
|
||||||
|
npm link
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
|
-l|--link) enable_link; shift;;
|
||||||
-t|--test) enable_test; shift;;
|
-t|--test) enable_test; shift;;
|
||||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
for PACKAGE in \
|
for PACKAGE in ${projects[@]}
|
||||||
ng2-alfresco-core \
|
|
||||||
ng2-activiti-diagrams \
|
|
||||||
ng2-activiti-analytics \
|
|
||||||
ng2-activiti-form \
|
|
||||||
ng2-activiti-tasklist \
|
|
||||||
ng2-activiti-processlist \
|
|
||||||
ng2-alfresco-datatable \
|
|
||||||
ng2-alfresco-documentlist \
|
|
||||||
ng2-alfresco-login \
|
|
||||||
ng2-alfresco-search \
|
|
||||||
ng2-alfresco-tag \
|
|
||||||
ng2-alfresco-upload \
|
|
||||||
ng2-alfresco-userinfo \
|
|
||||||
ng2-alfresco-viewer \
|
|
||||||
ng2-alfresco-webscript
|
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
build_project $DESTDIR $PACKAGE
|
build_project $DESTDIR $PACKAGE
|
||||||
done
|
done
|
||||||
|
|
||||||
build_project "$DIR/../demo-shell-ng2" "Demo Shell"
|
if $RUN_LINK == true; then
|
||||||
|
#LINK ALL THE COMPONENTS INSIDE THE DEMO-SHELL
|
||||||
|
cd "$DIR/../demo-shell-ng2"
|
||||||
|
for PACKAGE in ${projects[@]}
|
||||||
|
do
|
||||||
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
|
echo "====== demo shell linking: ${PACKAGE} ====="
|
||||||
|
npm link ${PACKAGE}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
@ -2,22 +2,23 @@
|
|||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
for PACKAGE in \
|
eval projects=( "ng2-activiti-diagrams"
|
||||||
ng2-activiti-diagrams \
|
"ng2-activiti-analytics"
|
||||||
ng2-activiti-analytics \
|
"ng2-activiti-form"
|
||||||
ng2-alfresco-core \
|
"ng2-activiti-processlist"
|
||||||
ng2-alfresco-datatable \
|
"ng2-activiti-tasklist"
|
||||||
ng2-alfresco-documentlist \
|
"ng2-alfresco-core"
|
||||||
ng2-activiti-form \
|
"ng2-alfresco-datatable"
|
||||||
ng2-alfresco-login \
|
"ng2-alfresco-documentlist"
|
||||||
ng2-activiti-processlist \
|
"ng2-alfresco-login"
|
||||||
ng2-alfresco-search \
|
"ng2-alfresco-search"
|
||||||
ng2-activiti-tasklist \
|
"ng2-alfresco-tag"
|
||||||
ng2-alfresco-tag \
|
"ng2-alfresco-upload"
|
||||||
ng2-alfresco-upload \
|
"ng2-alfresco-viewer"
|
||||||
ng2-alfresco-userinfo \
|
"ng2-alfresco-webscript"
|
||||||
ng2-alfresco-viewer \
|
"ng2-alfresco-userinfo" )
|
||||||
ng2-alfresco-webscript
|
|
||||||
|
for PACKAGE in ${projects[@]}
|
||||||
do
|
do
|
||||||
echo "====== clean component: ${PACKAGE} ====="
|
echo "====== clean component: ${PACKAGE} ====="
|
||||||
cd "$DIR/../ng2-components/${PACKAGE}"
|
cd "$DIR/../ng2-components/${PACKAGE}"
|
||||||
|
@ -24,6 +24,7 @@ do
|
|||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== PUBLISHING: ${DESTDIR} ====="
|
echo "====== PUBLISHING: ${DESTDIR} ====="
|
||||||
cd ${DESTDIR}
|
cd ${DESTDIR}
|
||||||
|
npm run clean
|
||||||
npm install
|
npm install
|
||||||
npm run publish:prod
|
npm run publish:prod
|
||||||
cd ${DIR}
|
cd ${DIR}
|
||||||
|
@ -32,7 +32,7 @@ link() {
|
|||||||
"$DIR/npm-link-demo-shell.sh"
|
"$DIR/npm-link-demo-shell.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
eval OPTIONS=$1
|
eval args=("$@");
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -41,10 +41,10 @@ while [[ $1 == -* ]]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
shift $(expr $OPTIND - 1 )
|
set -- "${args[@]}";
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
case "$OPTIONS" in
|
case "$1" in
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
-i|--install) install; shift;;
|
-i|--install) install; shift;;
|
||||||
-u|--update) update; shift;;
|
-u|--update) update; shift;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user