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:
Mario Romano
2017-05-11 18:08:35 +01:00
committed by Eugenio Romano
parent b0be88ec37
commit 6da0eaba37
88 changed files with 3203 additions and 774 deletions

View File

@@ -2,28 +2,49 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../demo-shell-ng2"
eval EXEC_INSTALL=false
eval EXEC_UPDATE=false
eval EXEC_CLEAN=false
eval EXEC_DEVELOP=false
show_help() {
echo "Usage: start.sh"
echo ""
echo "-d or -develop start the demo shell using the relative ng2-components folder to link the components"
echo "-i or -install start the demo shell and install the dependencies"
echo "-u or -update start the demo shell and update the dependencies"
echo "-c or -cleanInstall clean the demo shell install the dependencies and start the the demo shell"
echo "-c or -clean clean the demo shell and reinstall the dependencies"
echo "-r or -registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' "
}
install() {
npm install
EXEC_INSTALL=true
}
update() {
echo "update"
npm run update
EXEC_UPDATE=true
}
cleanInstall() {
npm run clean
npm install
develop() {
EXEC_DEVELOP=true
}
change_registry(){
NPM_REGISTRY=$1
if [[ "${NPM_REGISTRY}" == "" ]]
then
echo "NPM registry required WITH OPTION -r | -registry"
exit 0
fi
echo "====== CHANGE REGISTRY: ${NPM_REGISTRY} ====="
npm config set registry ${NPM_REGISTRY}
}
clean() {
EXEC_CLEAN=true
EXEC_INSTALL=true
}
while [[ $1 == -* ]]; do
@@ -31,9 +52,47 @@ while [[ $1 == -* ]]; do
-h|--help|-\?) show_help; exit 0;;
-i|--install) install; shift;;
-u|--update) update; shift;;
-c|--cleanInstall) cleanInstall; shift;;
-c|--clean) clean; shift;;
-d|--develop) develop; shift;;
-r|--registry) change_registry $2; shift 2;;
-*) shift;;
esac
done
npm run start
if $EXEC_CLEAN == true; then
echo "====== Clean Demo shell ====="
cd "$DIR/../demo-shell-ng2"
npm install rimraf
npm run clean
fi
if $EXEC_DEVELOP == true; then
echo "====== Build ng2-components folder====="
cd "$DIR/../scripts"
sh npm-build-all.sh
fi
if $EXEC_INSTALL == true; then
echo "====== Install Demo shell ====="
cd "$DIR/../demo-shell-ng2"
npm install
fi
if $EXEC_UPDATE == true; then
echo "====== Update Demo shell ====="
cd "$DIR/../demo-shell-ng2"
npm update
fi
if $EXEC_DEVELOP == true; then
echo "====== Start Demo shell development mode====="
cd "$DIR/../demo-shell-ng2"
npm run start:dev
fi
if $EXEC_DEVELOP == false; then
echo "====== Start Demo shell ====="
cd "$DIR/../demo-shell-ng2"
npm run start
fi