diff --git a/ng2-components/ng2-activiti-analytics/package.json b/ng2-components/ng2-activiti-analytics/package.json index 27a127a44b..8060ba0716 100644 --- a/ng2-components/ng2-activiti-analytics/package.json +++ b/ng2-components/ng2-activiti-analytics/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-activiti-diagrams/package.json b/ng2-components/ng2-activiti-diagrams/package.json index edac876d2d..97cd06e0b6 100644 --- a/ng2-components/ng2-activiti-diagrams/package.json +++ b/ng2-components/ng2-activiti-diagrams/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-activiti-form/package.json b/ng2-components/ng2-activiti-form/package.json index 099c85cf29..3e26fbc07a 100644 --- a/ng2-components/ng2-activiti-form/package.json +++ b/ng2-components/ng2-activiti-form/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-activiti-processlist/package.json b/ng2-components/ng2-activiti-processlist/package.json index 55867e443d..1dd43c6e7b 100644 --- a/ng2-components/ng2-activiti-processlist/package.json +++ b/ng2-components/ng2-activiti-processlist/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-activiti-tasklist/package.json b/ng2-components/ng2-activiti-tasklist/package.json index b72fb9bb9b..68b3e1c013 100644 --- a/ng2-components/ng2-activiti-tasklist/package.json +++ b/ng2-components/ng2-activiti-tasklist/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index 008076afbe..9d10b9ba14 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index d1ea3f84bb..92ab286c12 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 3cce5ab3f4..f305fa3087 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index da02f684d8..e62d6019bf 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-tag/package.json b/ng2-components/ng2-alfresco-tag/package.json index 4cc99cbd5e..c2fcf07b24 100644 --- a/ng2-components/ng2-alfresco-tag/package.json +++ b/ng2-components/ng2-alfresco-tag/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index 029ea9b5b4..f5a8262ff0 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-userinfo/package.json b/ng2-components/ng2-alfresco-userinfo/package.json index 66cffc2439..b753f8f526 100644 --- a/ng2-components/ng2-alfresco-userinfo/package.json +++ b/ng2-components/ng2-alfresco-userinfo/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index 152e57641d..e16fb70475 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/ng2-components/ng2-alfresco-webscript/package.json b/ng2-components/ng2-alfresco-webscript/package.json index d832bfaf89..22eb9cdfa9 100644 --- a/ng2-components/ng2-alfresco-webscript/package.json +++ b/ng2-components/ng2-alfresco-webscript/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", - "clean-build": "rimraf index.js index.js.map index.d.ts'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", + "clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles", "build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd", "build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'", diff --git a/scripts/README.md b/scripts/README.md index 3e7ac8763f..ec0283c9a7 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -47,10 +47,16 @@ in the demo shell: ./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: ```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: diff --git a/scripts/npm-build-all.sh b/scripts/npm-build-all.sh index 9235afbebd..5ed6febc2b 100755 --- a/scripts/npm-build-all.sh +++ b/scripts/npm-build-all.sh @@ -2,54 +2,79 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 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() { echo "Usage: npm-build-all.sh" echo "" 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(){ RUN_TEST=true } +enable_link(){ + RUN_LINK=true +} + build_project() { cd $1 echo "====== build project: $2 =====" npm install - npm build + if $RUN_TEST == true; then npm run test fi + + npm run tsc + npm run build.umd + + if $RUN_LINK == true; then + npm run travis + npm link + fi } while [[ $1 == -* ]]; do case "$1" in -h|--help|-\?) show_help; exit 0;; + -l|--link) enable_link; shift;; -t|--test) enable_test; shift;; -*) echo "invalid option: $1" 1>&2; show_help; exit 1;; esac done -for PACKAGE in \ - 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 +for PACKAGE in ${projects[@]} do DESTDIR="$DIR/../ng2-components/${PACKAGE}" build_project $DESTDIR $PACKAGE 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 diff --git a/scripts/npm-clean.sh b/scripts/npm-clean.sh index 9128d0b187..b91689a2be 100755 --- a/scripts/npm-clean.sh +++ b/scripts/npm-clean.sh @@ -2,22 +2,23 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -for PACKAGE in \ - ng2-activiti-diagrams \ - ng2-activiti-analytics \ - ng2-alfresco-core \ - ng2-alfresco-datatable \ - ng2-alfresco-documentlist \ - ng2-activiti-form \ - ng2-alfresco-login \ - ng2-activiti-processlist \ - ng2-alfresco-search \ - ng2-activiti-tasklist \ - ng2-alfresco-tag \ - ng2-alfresco-upload \ - ng2-alfresco-userinfo \ - ng2-alfresco-viewer \ - ng2-alfresco-webscript +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" ) + +for PACKAGE in ${projects[@]} do echo "====== clean component: ${PACKAGE} =====" cd "$DIR/../ng2-components/${PACKAGE}" diff --git a/scripts/npm-publish.sh b/scripts/npm-publish.sh index b78e2b7db4..c6aa28663b 100755 --- a/scripts/npm-publish.sh +++ b/scripts/npm-publish.sh @@ -24,6 +24,7 @@ do DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== PUBLISHING: ${DESTDIR} =====" cd ${DESTDIR} + npm run clean npm install npm run publish:prod cd ${DIR} diff --git a/scripts/start.sh b/scripts/start.sh index 86b2060853..e8e7379933 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -32,7 +32,7 @@ link() { "$DIR/npm-link-demo-shell.sh" } -eval OPTIONS=$1 +eval args=("$@"); while [[ $1 == -* ]]; do case "$1" in @@ -41,10 +41,10 @@ while [[ $1 == -* ]]; do esac done -shift $(expr $OPTIND - 1 ) +set -- "${args[@]}"; while [[ $1 == -* ]]; do - case "$OPTIONS" in + case "$1" in -h|--help|-\?) show_help; exit 0;; -i|--install) install; shift;; -u|--update) update; shift;;