mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix build problem (#1861)
* fix sourcemap fix relative path and pre publish build change travis wait all test run build and remove unused cpx * global test task modify publish script to accept options * appveyor run * different approach single test run * make it work the analytics test modify start demo shell script to use a different registry * sourcemap demo shell working * update readme and add install after any clean add registry option in start.sh script add develop and normal mode in demo shell add -d option in start.sh to point to the local components add -c option in build script to point to the local components
This commit is contained in:
committed by
Eugenio Romano
parent
b0be88ec37
commit
6da0eaba37
@@ -2,6 +2,7 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
eval RUN_TEST=false
|
||||
eval EXEC_CLEAN=false
|
||||
|
||||
eval projects=( "ng2-alfresco-core"
|
||||
"ng2-alfresco-datatable"
|
||||
@@ -20,11 +21,11 @@ eval projects=( "ng2-alfresco-core"
|
||||
"ng2-alfresco-viewer"
|
||||
"ng2-alfresco-webscript"
|
||||
"ng2-alfresco-userinfo" )
|
||||
|
||||
show_help() {
|
||||
echo "Usage: npm-build-all.sh"
|
||||
echo ""
|
||||
echo "-t or -test build all your local component and run also the test on them"
|
||||
echo "-c or -clean the ndode_moduels folder before to start the build"
|
||||
}
|
||||
|
||||
enable_test(){
|
||||
@@ -33,30 +34,45 @@ enable_test(){
|
||||
|
||||
test_project() {
|
||||
echo "====== test project: $1 ====="
|
||||
npm run test || exit 1
|
||||
npm run test -- --component $1 || exit 1
|
||||
}
|
||||
|
||||
clean() {
|
||||
EXEC_CLEAN=true
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-t|--test) enable_test; shift;;
|
||||
-c|--clean) clean; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd "$DIR/../ng2-components/"
|
||||
npm install package-json-merge -g
|
||||
npm install rimraf -g
|
||||
|
||||
if $EXEC_CLEAN == true; then
|
||||
echo "====== Clean ng2-components ====="
|
||||
npm install rimraf
|
||||
npm run clean
|
||||
fi
|
||||
|
||||
echo "====== Regenerate global ng2-components package.json ====="
|
||||
npm install package-json-merge
|
||||
npm run pkg-build
|
||||
npm install && npm run build || exit 1
|
||||
|
||||
echo "====== Install ng2-components dependencies ====="
|
||||
npm install
|
||||
|
||||
echo "====== Build ng2-components ====="
|
||||
npm run build || exit 1
|
||||
|
||||
for PACKAGE in ${projects[@]}
|
||||
do
|
||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||
DESTDIR="$DIR/../ng2-components/"
|
||||
cd $DESTDIR
|
||||
if $RUN_TEST == true; then
|
||||
test_project $PACKAGE
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user