mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Add config files in any components folder (#1878)
* add config files in any components folder * all test run option ft and option to skip build and run only test
This commit is contained in:
committed by
Eugenio Romano
parent
130c2e4428
commit
af82f83669
@@ -105,6 +105,20 @@ feel for what's available.
|
||||
./npm-build-all.sh -gitjsapi de92be966e2ce7eca642ca9e9d7647ba4f849356
|
||||
```
|
||||
|
||||
* If you want avoid initial build and run only all the test
|
||||
|
||||
```sh
|
||||
./npm-buid-all.sh -s -t
|
||||
```
|
||||
|
||||
* If you want test in less time (high memoery consumign less detail)
|
||||
|
||||
```sh
|
||||
./npm-buid-all.sh -ft //test and build
|
||||
|
||||
./npm-buid-all.sh -s -ft //only test
|
||||
```
|
||||
|
||||
* If you want clean all your local component and the demo shell:
|
||||
|
||||
```sh
|
||||
|
@@ -2,7 +2,9 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
eval RUN_TEST=false
|
||||
eval EXEC_FAST_TEST=false
|
||||
eval EXEC_CLEAN=false
|
||||
eval EXEC_BUILD=true
|
||||
eval EXEC_GIT_NPM_INSTALL_JSAPI=false
|
||||
eval GIT_ISH=""
|
||||
|
||||
@@ -27,7 +29,9 @@ eval projects=( "ng2-alfresco-core"
|
||||
show_help() {
|
||||
echo "Usage: npm-build-all.sh"
|
||||
echo ""
|
||||
echo "-e or -exclude exclude initial build"
|
||||
echo "-t or -test build all your local component and run also the test on them"
|
||||
echo "-ft or -fast test build all your local component and run also the test in one single karmatestshim (high memory consuming and less details)"
|
||||
echo "-c or -clean the node_modules folder before to start the build"
|
||||
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
|
||||
}
|
||||
@@ -41,6 +45,10 @@ test_project() {
|
||||
npm run test -- --component $1 || exit 1
|
||||
}
|
||||
|
||||
enable_fast_test() {
|
||||
EXEC_FAST_TEST=true
|
||||
}
|
||||
|
||||
enable_js_api_git_link() {
|
||||
GIT_ISH='git://github.com/Alfresco/alfresco-js-api.git#'$1
|
||||
EXEC_GIT_NPM_INSTALL_JSAPI=true
|
||||
@@ -50,13 +58,19 @@ clean() {
|
||||
EXEC_CLEAN=true
|
||||
}
|
||||
|
||||
exclude_build(){
|
||||
EXEC_BUILD=false
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-t|--test) enable_test; shift;;
|
||||
-ft|--fasttest) enable_fast_test; shift;;
|
||||
-gitjsapi) enable_js_api_git_link $2; shift 2;;
|
||||
-v|--version) install_version_pacakge $2; shift 2;;
|
||||
-c|--clean) clean; shift;;
|
||||
-s|--skipbuild) exclude_build; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
@@ -84,8 +98,15 @@ if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
|
||||
cd "$DIR/../ng2-components/"
|
||||
fi
|
||||
|
||||
echo "====== Build ng2-components ====="
|
||||
npm run build || exit 1
|
||||
if $EXEC_BUILD == true; then
|
||||
echo "====== Build ng2-components ====="
|
||||
npm run build || exit 1
|
||||
fi
|
||||
|
||||
if $EXEC_FAST_TEST == true; then
|
||||
echo "====== Test all ng2-components (fast option) ====="
|
||||
npm run test || exit 1
|
||||
fi
|
||||
|
||||
for PACKAGE in ${projects[@]}
|
||||
do
|
||||
|
@@ -107,7 +107,7 @@ do
|
||||
fi
|
||||
|
||||
echo "====== PUBLISHING: ${DESTDIR} ===== npm publish ${OPTIONS}"
|
||||
npm publish ${OPTIONS}
|
||||
npm publish ${OPTIONS} || exit 1
|
||||
|
||||
if $EXEC_CHANGE_REGISTRY == true; then
|
||||
npm run rimraf .npmrc
|
||||
|
Reference in New Issue
Block a user