New packages org (#2639)

New packages org
This commit is contained in:
Eugenio Romano
2017-11-16 14:12:52 +00:00
committed by GitHub
parent 6a24c6ef75
commit a52bb5600a
1984 changed files with 17179 additions and 40423 deletions

View File

@@ -19,19 +19,19 @@ feel of what's available.
# Quick examples developed with ADF
* Start the demo shell using the JS-API from the development branch and the local component in the ng2-components folder
* Start the demo shell using the JS-API from the development branch and the local component in the lib folder
```sh
./start.sh -dev -t -gitjsapi development
```
* Build the ng2-components folder using the JS-API from the development branch
* Build the lib folder using the JS-API from the development branch
```sh
./npm-build-all.sh -gitjsapi development
```
* Build the ng2-components folder using the JS-API from the development branch and run the tests on it
* Build the lib folder using the JS-API from the development branch and run the tests on it
```sh
./npm-build-all.sh -t -gitjsapi development
@@ -53,10 +53,10 @@ All the commands before can be used in combination
| -c or --clean | clean the demo shell folder before starting it |
| -t or --test | run the tests on the demo-shell |
| -r or --registry | Start the demo using an alternative npm registry |
| -v or --version | Use the version defined in the pacakge.json . Download from npm and Install a different version of the ng2-components (this option is not compatible with -dev) |
| -v or --version | Use the version defined in the pacakge.json . Download from npm and Install a different version of the lib (this option is not compatible with -dev) |
| -si or --skipinstall | skip the install of the node_modules |
| -ss or --skipstart | skip the start of the demo shell and only build it providing a dist folder in the relative demo-shell-ng2 folder |
| -dev or --develop | Start the demo in development mode building the relative folder ng2-components with all the components and pointing to those components instead of the ng2-components present in the node_modules folder |
| -ss or --skipstart | skip the start of the demo shell and only build it providing a dist folder in the relative demo-shell folder |
| -dev or --develop | Start the demo in development mode building the relative folder lib with all the components and pointing to those components instead of the lib present in the node_modules folder |
| -dist | Start the demo shell using a light server and the files built in the dist folder, particular useful to test the final result of the project |
| -gitjsapi | Start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API |
| -vjsapi | Use the version defined in the pacakge.json. Download from npm and install a different version of JS-API |
@@ -88,7 +88,7 @@ All the commands before can be used in combination
./start.sh -update or -u
```
* Use instead the version defined in the pacakge.json. Download from npm and install a different version of the ng2-components (this option is not compatible with -dev) |
* Use instead the version defined in the pacakge.json. Download from npm and install a different version of the lib (this option is not compatible with -dev) |
```sh
./start.sh -version or -v COMPONENTS_VERSION
@@ -96,7 +96,7 @@ All the commands before can be used in combination
./start.sh -v 1.4.0
```
* Start the demo in development mode building the relative folder ng2-components with all the components and pointing to this component instead of the node_modules one
* Start the demo in development mode building the relative folder lib with all the components and pointing to this component instead of the node_modules one
```sh
./start.sh -develop or -dev
@@ -134,7 +134,7 @@ All the commands before can be used in combination
# npm-build-all.sh
***npm-build-all.sh*** this script provides an easy way to deal with the npm command and the correct sequence to build the ng2-components
***npm-build-all.sh*** this script provides an easy way to deal with the npm command and the correct sequence to build the lib
## Options
@@ -170,7 +170,7 @@ The default behaviour of the ***npm-build-all.sh*** install node_modules and bui
./npm-build-all.sh -d
```
* Clean the ng2-components folder node_modules before build
* Clean the lib folder node_modules before build
```sh
./npm-build-all.sh -c
@@ -204,7 +204,7 @@ The default behaviour of the ***npm-build-all.sh*** install node_modules and bui
./npm-clean.sh
```
For development environment configuration please refer to [project docs](../demo-shell-ng2/README.md).
For development environment configuration please refer to [project docs](../demo-shell/README.md).
# npm-relock-pkgs.sh
@@ -246,7 +246,7 @@ For development environment configuration please refer to [project docs](../demo
# npm-clean.sh
***npm-clean.sh*** clean all the projects folders : ng2-components and demo-shell-ng2.
***npm-clean.sh*** clean all the projects folders : lib and demo-shell.
## Options

View File

@@ -25,11 +25,11 @@ while [[ $1 == -* ]]; do
esac
done
COMPONENTS_ROOT="$DIR/../ng2-components"
COMPONENTS_ROOT="$DIR/../lib"
# Find all directories in $COMPONENTS_ROOT called i18n and add the demo-shell manually
COMPONENTS=(`find $COMPONENTS_ROOT -type d -name i18n -not \( -name '*.*' -o -path '**/node_modules*' -o -path '**/bundles*' \)`)
COMPONENTS+=("$DIR/../demo-shell-ng2/resources/i18n")
COMPONENTS+=("$DIR/../demo-shell/resources/i18n")
# Loop the individual components
for COMPONENT_DIR in "${COMPONENTS[@]}"

View File

@@ -1,109 +0,0 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval NAME_PKG=''
eval SAVE_OPT=false
eval SAVE_DEV_OPT=false
eval SAVE_EXACT=false
show_help() {
echo "Usage: npm-add-pkg.sh"
echo ""
echo "--package or -p name of the package"
echo "--save"
echo "--save-dev"
echo "--save-exact"
}
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-social"
"ng2-alfresco-tag"
"ng2-alfresco-upload"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
save(){
SAVE_OPT=true
}
save_dev(){
SAVE_DEV_OPT=true
}
save_exact(){
SAVE_EXACT=true
}
name_package(){
NAME_PKG=$1
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
--save) save; shift;;
--save-dev) save_dev; shift;;
--save-exact) save_exact; shift;;
--package|-p) name_package $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
for PACKAGE in ${projects[@]}
do
echo "====== install package ${NAME_PKG} in component ${PACKAGE} ====="
cd "$DIR/../ng2-components/${PACKAGE}"
if $SAVE_OPT == true; then
npm install --save ${NAME_PKG}
fi
if $SAVE_DEV_OPT == true; then
echo "====== npm install --save-dev ${NAME_PKG} ====="
npm install --save-dev ${NAME_PKG}
fi
if $SAVE_EXACT == true; then
echo "====== npm install ----save-exact${NAME_PKG} ====="
npm install --save-exact ${NAME_PKG}
fi
done
cd "$DIR/../demo-shell-ng2"
if $SAVE_OPT == true; then
npm install --save ${NAME_PKG}
fi
if $SAVE_DEV_OPT == true; then
npm install --save-dev ${NAME_PKG}
fi
if $SAVE_EXACT == true; then
npm install --save-exact ${NAME_PKG}
fi
cd "$DIR/../ng2-components"
if $SAVE_OPT == true; then
npm install --save ${NAME_PKG}
fi
if $SAVE_DEV_OPT == true; then
npm install --save-dev ${NAME_PKG}
fi
if $SAVE_EXACT == true; then
npm install --save-exact ${NAME_PKG}
fi

View File

@@ -15,22 +15,10 @@ eval SINGLE_TEST=""
eval EXEC_VERSION_JSAPI=false
eval JSAPI_VERSION=""
eval projects=( "ng2-alfresco-core"
"ng2-alfresco-datatable"
"ng2-alfresco-upload"
"ng2-alfresco-userinfo"
"ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
"ng2-activiti-tasklist"
"ng2-activiti-processlist"
"ng2-alfresco-documentlist"
"ng2-alfresco-login"
"ng2-alfresco-search"
"ng2-alfresco-social"
"ng2-alfresco-tag"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript" )
eval projects=( "core"
"content-services"
"insights"
"process-services" )
show_help() {
echo "Usage: npm-build-all.sh"
@@ -127,28 +115,25 @@ while [[ $1 == -* ]]; do
esac
done
cd "$DIR/../ng2-components/"
cd "$DIR/../lib/"
if $EXEC_CLEAN == true; then
echo "====== Clean ng2-components ====="
echo "====== Clean components ====="
npm install rimraf -g
npm run clean
fi
if $EXEC_INSTALL == true; then
echo "====== Regenerate global ng2-components package.json ====="
npm install package-json-merge -g
npm run pkg-build
echo "====== Install ng2-components dependencies ====="
echo "====== Install components dependencies ====="
npm install
fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $GIT_ISH --no-save
cd "$DIR/../ng2-components/node_modules/alfresco-js-api"
cd "$DIR/../lib/node_modules/alfresco-js-api"
npm install
cd "$DIR/../ng2-components/"
cd "$DIR/../lib/"
fi
if $EXEC_VERSION_JSAPI == true; then
@@ -157,35 +142,33 @@ if $EXEC_VERSION_JSAPI == true; then
fi
if $EXEC_BUILD == true; then
echo "====== Build ng2-components ====="
echo "====== Build components ====="
npm run build || exit 1
fi
if $EXEC_FAST_TEST == true; then
echo "====== Test all ng2-components (fast option) ====="
echo "====== Test all components (fast option) ====="
npm run test || exit 1
fi
if $RUN_TEST == true; then
for PACKAGE in ${projects[@]}
do
DESTDIR="$DIR/../ng2-components/"
DESTDIR="$DIR/../lib/"
cd $DESTDIR
if $EXEC_SINGLE_TEST == true; then
if [[ $PACKAGE == $SINGLE_TEST ]]; then
test_project $PACKAGE
fi
cp -n "$DESTDIR/config/karma-test-shim.js" "$DESTDIR/$SINGLE_TEST/"
test_project $SINGLE_TEST
else
test_project $PACKAGE
for PACKAGE in ${projects[@]}
do
test_project $PACKAGE
done
fi
done
fi
if $RUN_TESTBROWSER == true; then
for PACKAGE in ${projects[@]}
do
DESTDIR="$DIR/../ng2-components/"
DESTDIR="$DIR/../lib/"
cd $DESTDIR
if [[ $PACKAGE == $SINGLE_TEST ]]; then
debug_project $PACKAGE

View File

@@ -4,22 +4,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval VERSION=""
eval projects=( "ng2-alfresco-core"
"ng2-alfresco-datatable"
"ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
"ng2-activiti-tasklist"
"ng2-activiti-processlist"
"ng2-alfresco-documentlist"
"ng2-alfresco-login"
"ng2-alfresco-search"
"ng2-alfresco-social"
"ng2-alfresco-tag"
"ng2-alfresco-upload"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
eval projects=( "@alfresco/adf-core"
"@alfresco/insights"
"@alfresco/adf-content-services"
"@alfresco/adf-process-services" )
show_help() {
echo "Usage: npm-check-bundles.sh"

View File

@@ -9,23 +9,6 @@ show_help() {
echo ""
}
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-social"
"ng2-alfresco-tag"
"ng2-alfresco-upload"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
@@ -35,19 +18,11 @@ done
npm install rimraf
for PACKAGE in ${projects[@]}
do
echo "====== clean component: ${PACKAGE} ====="
cd "$DIR/../ng2-components/${PACKAGE}"
npm run clean
npm run clean-lock
done
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
npm run clean
npm run clean-lock
cd "$DIR/../ng2-components"
cd "$DIR/../lib"
npm run clean
npm run clean-lock

View File

@@ -2,6 +2,11 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval projects=( "@alfresco/core"
"@alfresco/content-services"
"@alfresco/insights"
"@alfresco/process-services" )
show_help() {
echo "Usage: npm-clean.sh"
echo ""
@@ -26,23 +31,7 @@ while [[ $1 == -* ]]; do
esac
done
for PACKAGE in \
ng2-alfresco-core \
ng2-alfresco-datatable \
ng2-activiti-diagrams \
ng2-activiti-analytics \
ng2-activiti-form \
ng2-activiti-tasklist \
ng2-activiti-processlist \
ng2-alfresco-documentlist \
ng2-alfresco-login \
ng2-alfresco-search \
ng2-alfresco-tag \
ng2-alfresco-social \
ng2-alfresco-upload \
ng2-alfresco-viewer \
ng2-alfresco-webscript \
ng2-alfresco-userinfo
for PACKAGE in ${projects[@]}
do
echo "====== Move ${PACKAGE}@${PACKAGE_VERSION} to tag ${TAG}===== "
echo "====== command npm dist-tag add ${PACKAGE}@${PACKAGE_VERSION} ${TAG}===== "

View File

@@ -1,137 +0,0 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval OPTIONS=""
eval EXEC_CHANGE_REGISTRY=false
eval NPM_REGISTRY=false
eval TOKEN_REGISTRY=""
eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval GIT_ISH=""
eval EXEC_VERSION_JSAPI=false
eval JSAPI_VERSION=""
cd "$DIR/../demo-shell-ng2"
show_help() {
echo "Usage: npm-prepublish.sh"
echo ""
echo "-r or --registry to publish in an alternative npm registry -registry 'http://npm.local.me:8080/' "
echo "-token auth token for publish in the npm registry"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
echo "-vjsapi install different version from npm of JS-API defined in the package.json"
}
enable_change_registry(){
NPM_REGISTRY=$1
EXEC_CHANGE_REGISTRY=true
}
get_token_registry(){
TOKEN_REGISTRY=$1
if [[ "${TOKEN_REGISTRY}" == "" ]]
then
echo "token missing -token"
exit 0
fi
}
enable_js_api_git_link() {
GIT_ISH='git://github.com/Alfresco/alfresco-js-api.git#'$1
EXEC_GIT_NPM_INSTALL_JSAPI=true
}
version_js_api() {
JSAPI_VERSION=$1
if [[ "${JSAPI_VERSION}" == "" ]]
then
echo "JSAPI version required with -vJSApi"
exit 0
fi
EXEC_VERSION_JSAPI=true
}
change_registry(){
if [[ "${NPM_REGISTRY}" == "" ]]
then
echo "NPM registry required WITH OPTION -r | -registry"
exit 0
fi
echo "====== CHANGE REGISTRY: ${NPM_REGISTRY} ====="
touch .npmrc
echo 'strict-ssl=false' >> .npmrc
echo 'registry=http://'${NPM_REGISTRY} >> .npmrc
echo '//'${NPM_REGISTRY}'/:_authToken="'${TOKEN_REGISTRY}'"' >> .npmrc
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-gitjsapi) enable_js_api_git_link $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;;
-token) get_token_registry $2; shift 2;;
-r|--registry) enable_change_registry $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
npm install rimraf -g
for PACKAGE in \
ng2-alfresco-core \
ng2-alfresco-datatable \
ng2-activiti-diagrams \
ng2-activiti-analytics \
ng2-activiti-form \
ng2-activiti-tasklist \
ng2-activiti-processlist \
ng2-alfresco-documentlist \
ng2-alfresco-login \
ng2-alfresco-search \
ng2-alfresco-tag \
ng2-alfresco-social \
ng2-alfresco-upload \
ng2-alfresco-viewer \
ng2-alfresco-webscript \
ng2-alfresco-userinfo
do
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
echo "====== MOVE DIR: ${DESTDIR} ===== "
cd ${DESTDIR}
echo "====== INSTALL AND CLEAN ${PACKAGE} ===== "
npm run clean
if $EXEC_CHANGE_REGISTRY == true; then
change_registry
fi
npm install
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $GIT_ISH
cd "${DESTDIR}/node_modules/alfresco-js-api"
npm install
cd ${DESTDIR}
fi
if $EXEC_VERSION_JSAPI == true; then
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
npm install alfresco-js-api@${JSAPI_VERSION}
fi
echo "====== PREPUBLISHING: ${DESTDIR} ===== npm prepublish ${OPTIONS}"
npm run prepublishOnly || exit 1
if $EXEC_CHANGE_REGISTRY == true; then
npm run rimraf .npmrc
fi
cd ${DIR}
done

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -11,8 +12,15 @@ eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval GIT_ISH=""
eval EXEC_SLEEP=false
eval SLEEP_TIME="0"
eval EXEC_VERSION_JSAPI=false
eval JSAPI_VERSION=""
cd "$DIR/../demo-shell-ng2"
eval projects=( "core"
"insights"
"content-services"
"process-services" )
cd "$DIR/../lib"
show_help() {
echo "Usage: npm-publish.sh"
@@ -23,6 +31,7 @@ show_help() {
echo "-t or --tag to add a tag when publish a package"
echo "--sleep add a sleep before any publish"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
echo "-vjsapi <commit-ish> Install different version from npm of JS-API defined in the package.json"
}
enable_force(){
@@ -67,6 +76,18 @@ add_tag(){
OPTIONS="$OPTIONS --tag $1"
}
version_js_api() {
JSAPI_VERSION=$1
if [[ "${JSAPI_VERSION}" == "" ]]
then
echo "JSAPI version required with -vJSApi"
exit 0
fi
EXEC_VERSION_JSAPI=true
}
change_registry(){
if [[ "${NPM_REGISTRY}" == "" ]]
then
@@ -90,53 +111,46 @@ while [[ $1 == -* ]]; do
--sleep) set_sleep $2; shift 2;;
-r|--registry) enable_change_registry $2; shift 2;;
-gitjsapi) enable_js_api_git_link $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
npm install rimraf -g
for PACKAGE in \
ng2-alfresco-core \
ng2-alfresco-datatable \
ng2-alfresco-upload \
ng2-alfresco-userinfo \
ng2-activiti-diagrams \
ng2-activiti-analytics \
ng2-activiti-form \
ng2-activiti-tasklist \
ng2-activiti-processlist \
ng2-alfresco-documentlist \
ng2-alfresco-login \
ng2-alfresco-search \
ng2-alfresco-tag \
ng2-alfresco-social \
ng2-alfresco-viewer \
ng2-alfresco-webscript
do
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
echo "====== MOVE DIR: ${DESTDIR} ===== "
cd ${DESTDIR}
echo "====== INSTALL AND CLEAN ${PACKAGE} ===== "
npm run clean
npm install
echo "====== INSTALL AND CLEAN ${PACKAGE} ===== "
npm run clean
if $EXEC_CHANGE_REGISTRY == true; then
change_registry
fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $GIT_ISH
cd "${DESTDIR}/node_modules/alfresco-js-api"
npm install
cd ${DESTDIR}
fi
if $EXEC_VERSION_JSAPI == true; then
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
npm install alfresco-js-api@${JSAPI_VERSION} --no-save
fi
echo "====== Build ADF ===== "
npm run build
for PACKAGE in ${projects[@]}
do
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
echo "====== MOVE DIR: ${DESTDIR} ===== "
cd ${DESTDIR}
if $EXEC_CHANGE_REGISTRY == true; then
change_registry
fi
npm install
echo "====== PUBLISHING: ${DESTDIR} ===== npm publish ${OPTIONS}"
npm publish ${OPTIONS} || exit 1
npm publish ${OPTIONS} --access=public || exit 1
if $EXEC_CHANGE_REGISTRY == true; then
npm run rimraf .npmrc

View File

@@ -6,22 +6,9 @@ eval RUN_TEST=false
eval SELECTED_UNITS=""
eval SELECTED_UNITS_ONLY=false
eval projects=( "ng2-alfresco-core"
"ng2-alfresco-datatable"
"ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
"ng2-activiti-tasklist"
"ng2-activiti-processlist"
"ng2-alfresco-documentlist"
"ng2-alfresco-login"
"ng2-alfresco-search"
"ng2-alfresco-social"
"ng2-alfresco-tag"
"ng2-alfresco-upload"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
eval projects=( "core"
"content-services"
"process-services" )
show_help() {
echo "Usage: npm-relock-pkgs.sh [options] [packages...]"
@@ -63,7 +50,7 @@ echo "====== Regenerate package-lock.json ====="
for PACKAGE in ${projects[@]}
do
echo "====== $PACKAGE ====="
DESTDIR="$DIR/../ng2-components/$PACKAGE"
DESTDIR="$DIR/../lib/$PACKAGE"
cd $DESTDIR
npm run clean-lock
@@ -75,12 +62,12 @@ for PACKAGE in ${projects[@]}
fi
done
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
npm run clean-lock
npm run clean
npm install
cd "$DIR/../ng2-components"
cd "$DIR/../lib"
npm run clean-lock
npm run clean
npm install

View File

@@ -16,30 +16,16 @@ eval JSAPI_VERSION=""
eval NG2_COMPONENTS_VERSION=""
eval GIT_ISH=""
eval projects=( "ng2-alfresco-core"
"ng2-alfresco-datatable"
"ng2-alfresco-upload"
"ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
"ng2-activiti-tasklist"
"ng2-activiti-processlist"
"ng2-alfresco-documentlist"
"ng2-alfresco-login"
"ng2-alfresco-search"
"ng2-alfresco-social"
"ng2-alfresco-tag"
"ng2-alfresco-social"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
eval projects=( "@alfresco/core"
"@alfresco/content-service"
"@alfresco/process-service" )
show_help() {
echo "Usage: start.sh"
echo ""
echo "-ss or -skipstart build only the demo shell without start"
echo "-si or -skipinstall start the demo shell and skip the install the dependencies"
echo "-dev or -develop start the demo shell using the relative ng2-components folder to link the components"
echo "-dev or -develop start the demo shell using the relative lib folder to link the components"
echo "-dist create the disbuild the demo shell in dist mode"
echo "-t or -test execute test"
echo "-u or -update start the demo shell and update the dependencies"
@@ -139,7 +125,7 @@ while [[ $1 == -* ]]; do
esac
done
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
if $EXEC_CLEAN == true; then
echo "====== Clean Demo shell ====="
@@ -153,14 +139,14 @@ if $EXEC_INSTALL == true; then
fi
if $EXEC_DEVELOP == true; then
echo "====== Install node_modules ng2-components ====="
cd "$DIR/../ng2-components"
echo "====== Install node_modules components ====="
cd "$DIR/../lib"
npm install
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
fi
if $EXEC_VERSION == true; then
echo "====== Install version "${NG2_COMPONENTS_VERSION}" of ng2-components ====="
echo "====== Install version "${NG2_COMPONENTS_VERSION}" of components ====="
if [[ "${EXEC_DEVELOP}" == "" ]]
then
@@ -177,26 +163,26 @@ fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $GIT_ISH --no-save
cd "$DIR/../demo-shell-ng2/node_modules/alfresco-js-api"
cd "$DIR/../demo-shell/node_modules/alfresco-js-api"
npm install
if $EXEC_DEVELOP == true; then
cd "$DIR/../ng2-components/"
cd "$DIR/../lib/"
npm install $GIT_ISH --no-save
cd "$DIR/../ng2-components/node_modules/alfresco-js-api"
cd "$DIR/../lib/node_modules/alfresco-js-api"
npm install
fi
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
fi
if $EXEC_VERSION_JSAPI == true; then
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
npm install alfresco-js-api@${JSAPI_VERSION}
if $EXEC_DEVELOP == true; then
echo "====== Install node_modules ng2-components ====="
cd "$DIR/../ng2-components/"
echo "====== Install node_modules components ====="
cd "$DIR/../lib/"
npm install alfresco-js-api@${JSAPI_VERSION} --no-save
fi
cd "$DIR/../demo-shell-ng2"
cd "$DIR/../demo-shell"
fi
if $EXEC_TEST == true; then

View File

@@ -6,22 +6,9 @@ eval GNU=false
eval EXEC_COMPONENT=true
eval DIFFERENT_JS_API=false
eval projects=( "ng2-alfresco-core"
"ng2-alfresco-datatable"
"ng2-alfresco-upload"
"ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
"ng2-activiti-tasklist"
"ng2-activiti-processlist"
"ng2-alfresco-documentlist"
"ng2-alfresco-login"
"ng2-alfresco-search"
"ng2-alfresco-social"
"ng2-alfresco-tag"
"ng2-alfresco-viewer"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
eval projects=( "core"
"content-services"
"process-services" )
cd `dirname $0`
@@ -64,18 +51,18 @@ only_demoshell() {
update_component_version() {
echo "====== UPDATE PACKAGE VERSION of ${PACKAGE} to ${VERSION} version in all the package.json ======"
DESTDIR="$DIR/../ng2-components/${1}"
DESTDIR="$DIR/../lib/${1}"
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DESTDIR}/package.json
}
clean_lock() {
echo "====== clean lock file ${1} ======"
DESTDIR="$DIR/../ng2-components/${1}"
DESTDIR="$DIR/../lib/${1}"
rm ${DESTDIR}/package-lock.json
}
update_component_dependency_version(){
DESTDIR="$DIR/../ng2-components/${1}"
DESTDIR="$DIR/../lib/${1}"
for (( j=0; j<${projectslength}; j++ ));
do
@@ -88,7 +75,7 @@ update_component_dependency_version(){
}
update_total_build_dependency_version(){
DESTDIR="$DIR/../ng2-components/"
DESTDIR="$DIR/../lib/"
for (( j=0; j<${projectslength}; j++ ));
do
@@ -100,7 +87,7 @@ update_total_build_dependency_version(){
update_total_build_dependency_js_version(){
echo "====== UPDATE DEPENDENCY VERSION of total build to ~${1} in ${DESTDIR}======"
DESTDIR="$DIR/../ng2-components/"
DESTDIR="$DIR/../lib/"
PACKAGETOCHANGE="alfresco-js-api"
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"${PACKAGETOCHANGE}\": \"${1}\"/g" ${DESTDIR}/package.json
@@ -109,7 +96,7 @@ update_total_build_dependency_js_version(){
update_component_js_version(){
echo "====== UPDATE DEPENDENCY VERSION of alfresco-js-api in ${1} to ${2} ======"
DESTDIR="$DIR/../ng2-components/${1}"
DESTDIR="$DIR/../lib/${1}"
PACKAGETOCHANGE="alfresco-js-api"
@@ -123,7 +110,7 @@ update_demo_shell_dependency_version(){
for (( k=0; k<${projectslength}; k++ ));
do
echo "====== UPDATE VERSION OF DEMO-SHELL to ${projects[$k]} version ${VERSION} ======"
DESTDIR="$DIR/../demo-shell-ng2/"
DESTDIR="$DIR/../demo-shell/"
sed "${sedi[@]}" "s/\"${projects[$k]}\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"${projects[$k]}\": \"${VERSION}\"/g" ${DESTDIR}/package.json
sed "${sedi[@]}" "s/\"${projects[$k]}\": \"~[0-9]\\.[0-9]\\.[0-9]\"/\"${projects[$k]}\": \"~${VERSION}\"/g" ${DESTDIR}/package.json
@@ -132,7 +119,7 @@ update_demo_shell_dependency_version(){
update_demo_shell_js_version(){
echo "====== UPDATE VERSION OF DEMO-SHELL to alfresco-js-api version ${1} ======"
DESTDIR="$DIR/../demo-shell-ng2/"
DESTDIR="$DIR/../demo-shell/"
PACKAGETOCHANGE="alfresco-js-api"
sed "${sedi[@]}" "s/\"${PACKAGETOCHANGE}\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"${PACKAGETOCHANGE}\": \"${1}\"/g" ${DESTDIR}/package.json
@@ -141,7 +128,7 @@ update_demo_shell_js_version(){
clean_lock_demo_shell(){
echo "====== clean lock file demo-shell ======"
DESTDIR="$DIR/../demo-shell-ng2/"
DESTDIR="$DIR/../demo-shell/"
rm ${DESTDIR}/package-lock.json
}
@@ -222,11 +209,10 @@ if $JS_API == true; then
fi
fi
DESTDIR="$DIR/../demo-shell-ng2/"
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../demo-shell-ng2/package.json
DESTDIR="$DIR/../demo-shell/"
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../demo-shell/package.json
if $EXEC_COMPONENT == true; then
rm ${DIR}/../ng2-components/package-lock.json
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../ng2-components/package.json
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../ng2-components/package-base.json
rm ${DIR}/../lib/package-lock.json
sed "${sedi[@]}" "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../lib/package.json
fi