From 571b7f09c3cc13b261fa5615cf8c62214250aac2 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Mon, 27 Feb 2017 09:15:52 +0000 Subject: [PATCH] refactoring build script #1533 (#1664) --- .../ng2-activiti-analytics/demo/package.json | 1 + .../ng2-activiti-analytics/package.json | 4 +- .../ng2-activiti-diagrams/demo/package.json | 1 + .../ng2-activiti-diagrams/package.json | 4 +- .../ng2-activiti-form/demo/package.json | 1 + ng2-components/ng2-activiti-form/package.json | 4 +- .../demo/package.json | 1 + .../ng2-activiti-processlist/package.json | 4 +- .../ng2-activiti-tasklist/demo/package.json | 1 + .../ng2-activiti-tasklist/package.json | 4 +- ng2-components/ng2-alfresco-core/package.json | 4 +- .../ng2-alfresco-datatable/demo/package.json | 13 +- .../ng2-alfresco-datatable/package.json | 4 +- .../demo/package.json | 1 + .../ng2-alfresco-documentlist/package.json | 4 +- .../ng2-alfresco-login/demo/package.json | 1 + .../ng2-alfresco-login/package.json | 4 +- .../ng2-alfresco-search/demo/package.json | 1 + .../ng2-alfresco-search/package.json | 4 +- .../ng2-alfresco-tag/demo/package.json | 1 + ng2-components/ng2-alfresco-tag/package.json | 4 +- .../ng2-alfresco-upload/demo/package.json | 1 + .../ng2-alfresco-upload/package.json | 4 +- .../ng2-alfresco-userinfo/demo/package.json | 1 + .../ng2-alfresco-userinfo/package.json | 4 +- .../ng2-alfresco-viewer/demo/package.json | 1 + .../ng2-alfresco-viewer/package.json | 4 +- .../ng2-alfresco-webscript/demo/package.json | 1 + .../ng2-alfresco-webscript/package.json | 4 +- scripts/README.md | 14 ++- scripts/npm-build-all.sh | 2 +- scripts/npm-build-bundle-all.sh | 114 ------------------ scripts/npm-check.sh | 39 ------ scripts/npm-link-all-components-demo.sh | 93 +++----------- scripts/npm-link-demo-shell.sh | 103 +++------------- scripts/start-linked.sh | 21 ---- scripts/start.sh | 54 +++++++-- scripts/update-version.sh | 2 - 38 files changed, 137 insertions(+), 391 deletions(-) delete mode 100755 scripts/npm-build-bundle-all.sh delete mode 100755 scripts/npm-check.sh mode change 100755 => 100644 scripts/npm-link-demo-shell.sh delete mode 100755 scripts/start-linked.sh diff --git a/ng2-components/ng2-activiti-analytics/demo/package.json b/ng2-components/ng2-activiti-analytics/demo/package.json index 4f5c516807..d4bb7a4890 100644 --- a/ng2-components/ng2-activiti-analytics/demo/package.json +++ b/ng2-components/ng2-activiti-analytics/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-activiti-diagrams", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-activiti-analytics/package.json b/ng2-components/ng2-activiti-analytics/package.json index b588f155ae..5956423ae5 100644 --- a/ng2-components/ng2-activiti-analytics/package.json +++ b/ng2-components/ng2-activiti-analytics/package.json @@ -68,8 +68,8 @@ "ng2-activiti-diagrams": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-activiti-diagrams/demo/package.json b/ng2-components/ng2-activiti-diagrams/demo/package.json index 4b3c4a8350..8dfef3b41d 100644 --- a/ng2-components/ng2-activiti-diagrams/demo/package.json +++ b/ng2-components/ng2-activiti-diagrams/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-activiti-diagrams/package.json b/ng2-components/ng2-activiti-diagrams/package.json index 5f85fc06c9..1d31d45ebb 100644 --- a/ng2-components/ng2-activiti-diagrams/package.json +++ b/ng2-components/ng2-activiti-diagrams/package.json @@ -59,8 +59,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-activiti-form/demo/package.json b/ng2-components/ng2-activiti-form/demo/package.json index 357da84b8b..7f4ce0b8b9 100644 --- a/ng2-components/ng2-activiti-form/demo/package.json +++ b/ng2-components/ng2-activiti-form/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-activiti-form/package.json b/ng2-components/ng2-activiti-form/package.json index 60a605be69..849cfe0045 100644 --- a/ng2-components/ng2-activiti-form/package.json +++ b/ng2-components/ng2-activiti-form/package.json @@ -67,8 +67,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "^1.3.1", diff --git a/ng2-components/ng2-activiti-processlist/demo/package.json b/ng2-components/ng2-activiti-processlist/demo/package.json index daf16e9174..50ec74e40e 100644 --- a/ng2-components/ng2-activiti-processlist/demo/package.json +++ b/ng2-components/ng2-activiti-processlist/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-alfresco-datatable ng2-activiti-form ng2-activiti-tasklist", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-activiti-processlist/package.json b/ng2-components/ng2-activiti-processlist/package.json index 3831a82c71..4cf7c09457 100644 --- a/ng2-components/ng2-activiti-processlist/package.json +++ b/ng2-components/ng2-activiti-processlist/package.json @@ -69,8 +69,8 @@ "ng2-alfresco-datatable": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "^1.3.1", diff --git a/ng2-components/ng2-activiti-tasklist/demo/package.json b/ng2-components/ng2-activiti-tasklist/demo/package.json index 9a9fa316b0..8a4d19d7f6 100644 --- a/ng2-components/ng2-activiti-tasklist/demo/package.json +++ b/ng2-components/ng2-activiti-tasklist/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-alfresco-datatable ng2-activiti-form", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-activiti-tasklist/package.json b/ng2-components/ng2-activiti-tasklist/package.json index 012b704a7d..2bc8db7e9f 100644 --- a/ng2-components/ng2-activiti-tasklist/package.json +++ b/ng2-components/ng2-activiti-tasklist/package.json @@ -73,8 +73,8 @@ "ng2-alfresco-datatable": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 83ce20b737..a0ceed0fdb 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -79,8 +79,8 @@ "zone.js": "^0.6.23" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-datatable/demo/package.json b/ng2-components/ng2-alfresco-datatable/demo/package.json index 7c599a40c7..39dcda7003 100644 --- a/ng2-components/ng2-alfresco-datatable/demo/package.json +++ b/ng2-components/ng2-alfresco-datatable/demo/package.json @@ -3,12 +3,6 @@ "description": "Alfresco Angular2 DataTable Component - Demo", "version": "0.1.0", "author": "Alfresco Software, Ltd.", - "contributors": [ - { - "name": "Denys Vuika", - "email": "denis.vuyka@gmail.com" - } - ], "main": "index.js", "scripts": { "clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist", @@ -18,11 +12,18 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" }, "license": "Apache-2.0", + "contributors": [ + { + "name": "Denys Vuika", + "email": "denis.vuyka@gmail.com" + } + ], "dependencies": { "@angular/common": "2.2.2", "@angular/compiler": "2.2.2", diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index 2f52ee9d94..379a3f2070 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -65,8 +65,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-documentlist/demo/package.json b/ng2-components/ng2-alfresco-documentlist/demo/package.json index 581bb68be7..5cd45e432c 100644 --- a/ng2-components/ng2-alfresco-documentlist/demo/package.json +++ b/ng2-components/ng2-alfresco-documentlist/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-alfresco-datatable", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 3eba47e40c..b0a463c4e5 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -74,8 +74,8 @@ "ng2-alfresco-datatable": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-login/demo/package.json b/ng2-components/ng2-alfresco-login/demo/package.json index 98e1e8d761..ce853c8a13 100644 --- a/ng2-components/ng2-alfresco-login/demo/package.json +++ b/ng2-components/ng2-alfresco-login/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index bd17c47a6c..28093d9e07 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -76,8 +76,8 @@ "zone.js": "^0.6.23" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-search/demo/package.json b/ng2-components/ng2-alfresco-search/demo/package.json index a0b87ffac0..0e630ee224 100644 --- a/ng2-components/ng2-alfresco-search/demo/package.json +++ b/ng2-components/ng2-alfresco-search/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-alfresco-datatable ng2-alfresco-documentlist", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index f5a42668bd..44b49d3595 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -75,8 +75,8 @@ "ng2-alfresco-documentlist": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-tag/demo/package.json b/ng2-components/ng2-alfresco-tag/demo/package.json index 026ae547ed..4bd1c5e16b 100644 --- a/ng2-components/ng2-alfresco-tag/demo/package.json +++ b/ng2-components/ng2-alfresco-tag/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-tag/package.json b/ng2-components/ng2-alfresco-tag/package.json index f82bd328ac..3aed5384ea 100644 --- a/ng2-components/ng2-alfresco-tag/package.json +++ b/ng2-components/ng2-alfresco-tag/package.json @@ -52,8 +52,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "^1.3.1", diff --git a/ng2-components/ng2-alfresco-upload/demo/package.json b/ng2-components/ng2-alfresco-upload/demo/package.json index fa2a29a919..86ce3f76e7 100644 --- a/ng2-components/ng2-alfresco-upload/demo/package.json +++ b/ng2-components/ng2-alfresco-upload/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index 3a8444df69..8fadd81a0e 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -74,8 +74,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-userinfo/demo/package.json b/ng2-components/ng2-alfresco-userinfo/demo/package.json index 5d47fa3c61..0f18e590bf 100644 --- a/ng2-components/ng2-alfresco-userinfo/demo/package.json +++ b/ng2-components/ng2-alfresco-userinfo/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-userinfo/package.json b/ng2-components/ng2-alfresco-userinfo/package.json index 37294ef70c..0fe0c9c601 100644 --- a/ng2-components/ng2-alfresco-userinfo/package.json +++ b/ng2-components/ng2-alfresco-userinfo/package.json @@ -52,8 +52,8 @@ "ng2-alfresco-core": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "^1.3.1", diff --git a/ng2-components/ng2-alfresco-viewer/demo/package.json b/ng2-components/ng2-alfresco-viewer/demo/package.json index e738b90ad8..9aab6b6a40 100644 --- a/ng2-components/ng2-alfresco-viewer/demo/package.json +++ b/ng2-components/ng2-alfresco-viewer/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index 8d5643064c..7c9d344662 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -68,8 +68,8 @@ "pdfjs-dist": "1.5.404" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "1.3.1", diff --git a/ng2-components/ng2-alfresco-webscript/demo/package.json b/ng2-components/ng2-alfresco-webscript/demo/package.json index 1437aeaf3b..a8b99b8aa5 100644 --- a/ng2-components/ng2-alfresco-webscript/demo/package.json +++ b/ng2-components/ng2-alfresco-webscript/demo/package.json @@ -12,6 +12,7 @@ "server": "wsrv -o -s -l", "build": "npm run tslint && npm run clean-build && npm run tsc", "build:w": "npm run tslint && rimraf dist && npm run tsc:w", + "travis": "npm link ng2-alfresco-core ng2-alfresco-datatable", "tsc": "tsc", "tsc:w": "tsc -w", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'" diff --git a/ng2-components/ng2-alfresco-webscript/package.json b/ng2-components/ng2-alfresco-webscript/package.json index 616dfbced1..d15682c3b6 100644 --- a/ng2-components/ng2-alfresco-webscript/package.json +++ b/ng2-components/ng2-alfresco-webscript/package.json @@ -53,8 +53,8 @@ "ng2-alfresco-datatable": "1.1.0" }, "devDependencies": { - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.42", + "@types/jasmine": "2.5.35", + "@types/node": "6.0.45", "autoprefixer": "^6.5.4", "concurrently": "^2.2.0", "cpx": "^1.3.1", diff --git a/scripts/README.md b/scripts/README.md index 591d967700..64bd8c4ab4 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -13,7 +13,7 @@ feel for what's available. * Start the demo and Install all the dependencies (*Note. do it this way only the first time, and be aware, it will take some time*) ```sh -./start.sh -install +./start.sh -install or -i ``` * Start the demo (*the standard way of starting the demo after first initialization*): @@ -25,20 +25,20 @@ feel for what's available. * Start the demo, install all the dependencies, and remove the previous version of the npm packages (*Note. do this only after big changes*): ```sh -./start.sh -cleanInstall +./start.sh -cleanInstall or -c ``` * Start the demo and update the dependencies: ```sh -./start.sh -update +./start.sh -update or -u ``` * If you want to use your local components use the following script with any of the previous option. It will npm link all the components in the demo shell: ```sh -./start-linked.sh +./start.sh -link or -l ``` * If you want to build all your local component: @@ -47,4 +47,10 @@ in the demo shell: ./npm-buid-alll.sh ``` +* If you want clean all your local component and the demo shell: + +```sh +./npm-clean.sh +``` + For development environment configuration please refer to [project docs](../demo-shell-ng2/README.md). diff --git a/scripts/npm-build-all.sh b/scripts/npm-build-all.sh index 6ddb4aeba9..0a3f369f09 100755 --- a/scripts/npm-build-all.sh +++ b/scripts/npm-build-all.sh @@ -5,7 +5,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" build_project() { cd $1 echo "====== build project: $2 =====" - npm run build + npm install } for PACKAGE in \ diff --git a/scripts/npm-build-bundle-all.sh b/scripts/npm-build-bundle-all.sh deleted file mode 100755 index 30a99cf06d..0000000000 --- a/scripts/npm-build-bundle-all.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -#LINK CORE -echo "====== linking component: ng2-alfresco-core =====" -cd "$DIR/../ng2-components/ng2-alfresco-core" -npm link - -#LINK FORM -echo "====== linking component: ng2-activiti-form =====" -cd "$DIR/../ng2-components/ng2-activiti-form" -npm link ng2-alfresco-core -npm link - -#LINK DATATABLE -echo "====== linking component: ng2-alfresco-datatable =====" -cd "$DIR/../ng2-components/ng2-alfresco-datatable" -npm link ng2-alfresco-core -npm link - -#LINK DOCUMENTLIST -echo "====== linking component: ng2-alfresco-documentlist =====" -cd "$DIR/../ng2-components/ng2-alfresco-documentlist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link - -#LINK WEBSCRIPT -echo "====== linking component: ng2-alfresco-webscript =====" -cd "$DIR/../ng2-components/ng2-alfresco-webscript" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link - -#LINK TASKLIST -echo "====== linking component: ng2-activiti-tasklist =====" -cd "$DIR/../ng2-components/ng2-activiti-tasklist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm link - -#LINK PROCESSLIST -echo "====== linking component: ng2-activiti-processlist =====" -cd "$DIR/../ng2-components/ng2-activiti-processlist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm link ng2-activiti-tasklist -npm link - -#LINK DIAGRAMS -echo "====== linking component: ng2-activiti-diagrams =====" -cd "$DIR/../ng2-components/ng2-activiti-diagrams" -npm link ng2-alfresco-core -npm link - -#LINK ANALYTICS -echo "====== linking component: ng2-activiti-analytics =====" -cd "$DIR/../ng2-components/ng2-activiti-analytics" -npm link ng2-alfresco-core -npm link ng2-activiti-diagrams -npm link - -#LINK SEARCH -echo "====== linking component: ng2-alfresco-search =====" -cd "$DIR/../ng2-components/ng2-alfresco-search" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-alfresco-documentlist -npm link - -#LINK ALL THE OTHERS COMPONENTS -for PACKAGE in \ - ng2-alfresco-login \ - ng2-alfresco-userinfo \ - ng2-alfresco-upload \ - ng2-alfresco-tag \ - ng2-alfresco-viewer -do - DESTDIR="$DIR/../ng2-components/${PACKAGE}" - echo "====== linking component: ${PACKAGE} =====" - cd "$DESTDIR" - npm link ng2-alfresco-core - npm link -done - - -#LINK ALL THE COMPONENTS INSIDE THE DEMOSHELL -cd "$DIR/../demo-shell-ng2" -for PACKAGE in \ - 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 -do - DESTDIR="$DIR/../ng2-components/${PACKAGE}" - echo "====== demo shell linking: ${PACKAGE} =====" - npm link ${PACKAGE} -done - -npm install diff --git a/scripts/npm-check.sh b/scripts/npm-check.sh deleted file mode 100755 index fa64945cef..0000000000 --- a/scripts/npm-check.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -npm install -g npm-check - -echo 'start' > ../check-dependecies.log - -for PACKAGE in \ - 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 -do - echo "====== Check component: ${PACKAGE} =====" - cd "$DIR/../ng2-components/${PACKAGE}" - echo "====== Check component: ${PACKAGE} =====" >> ../../check-dependecies.log - npm-check >> ../../check-dependecies.log -done - -cd "$DIR/../demo-shell-ng2" -echo "====== Check component: ${PACKAGE} =====" >> ../check-dependecies.log -npm-check >> ../check-dependecies.log - -echo "====== You can find the log in the file check-dependecies.log in the main root=====" - - -cd ${DIR} diff --git a/scripts/npm-link-all-components-demo.sh b/scripts/npm-link-all-components-demo.sh index bd09e0c988..f2cf77974f 100755 --- a/scripts/npm-link-all-components-demo.sh +++ b/scripts/npm-link-all-components-demo.sh @@ -7,91 +7,28 @@ echo "====== linking component: ng2-alfresco-core =====" cd "$DIR/../ng2-components/ng2-alfresco-core/demo" npm install -#LINK FORM -echo "====== linking component: ng2-activiti-form =====" -cd "$DIR/../ng2-components/ng2-activiti-form/demo" -npm link ng2-activiti-form -npm link ng2-alfresco-core -npm install - -#LINK DATATABLE -echo "====== linking component: ng2-alfresco-datatable =====" -cd "$DIR/../ng2-components/ng2-alfresco-datatable/demo" -npm link ng2-alfresco-datatable -npm link ng2-alfresco-core -npm install - -#LINK DOCUMENTLIST -echo "====== linking component: ng2-alfresco-documentlist =====" -cd "$DIR/../ng2-components/ng2-alfresco-documentlist/demo" -npm link ng2-alfresco-documentlist -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm install - -#LINK WEBSCRIPT -echo "====== linking component: ng2-alfresco-webscript =====" -cd "$DIR/../ng2-components/ng2-alfresco-webscript/demo" -npm link ng2-alfresco-webscript -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm install - -#LINK TASKLIST -echo "====== linking component: ng2-activiti-tasklist =====" -cd "$DIR/../ng2-components/ng2-activiti-tasklist/demo" -npm link ng2-activiti-tasklist -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm install - -#LINK PROCESSLIST -echo "====== linking component: ng2-activiti-processlist =====" -cd "$DIR/../ng2-components/ng2-activiti-processlist/demo" -npm link ng2-activiti-processlist -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm link ng2-activiti-tasklist -npm install - -#LINK DIAGRAMS -echo "====== linking component: ng2-activiti-diagrams =====" -cd "$DIR/../ng2-components/ng2-activiti-diagrams/demo" -npm link ng2-activiti-diagrams -npm link ng2-alfresco-core -npm install - -#LINK ANALYTICS -echo "====== linking component: ng2-activiti-analytics =====" -cd "$DIR/../ng2-components/ng2-activiti-analytics/demo" -npm link ng2-activiti-analytics -npm link ng2-alfresco-core -npm link ng2-activiti-diagrams -npm install - -#LINK SEARCH -echo "====== linking component: ng2-alfresco-search =====" -cd "$DIR/../ng2-components/ng2-alfresco-search/demo" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-alfresco-documentlist -npm link ng2-alfresco-search -npm link -npm run build - #LINK ALL THE OTHERS COMPONENTS 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-userinfo \ - ng2-alfresco-upload \ + ng2-alfresco-search \ ng2-alfresco-tag \ - ng2-alfresco-viewer + ng2-alfresco-upload \ + ng2-alfresco-viewer \ + ng2-alfresco-webscript \ + ng2-alfresco-userinfo do DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== linking component: ${PACKAGE} =====" cd "$DESTDIR/demo" - npm link ng2-alfresco-core + npm link ${PACKAGE} + npm travis npm install done diff --git a/scripts/npm-link-demo-shell.sh b/scripts/npm-link-demo-shell.sh old mode 100755 new mode 100644 index bb67f0931a..0b0870fa63 --- a/scripts/npm-link-demo-shell.sh +++ b/scripts/npm-link-demo-shell.sh @@ -2,103 +2,32 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -#LINK CORE -echo "====== linking component: ng2-alfresco-core =====" -cd "$DIR/../ng2-components/ng2-alfresco-core" -npm link -npm run build - -#LINK FORM -echo "====== linking component: ng2-activiti-form =====" -cd "$DIR/../ng2-components/ng2-activiti-form" -npm link ng2-alfresco-core -npm link -npm run build - -#LINK DATATABLE -echo "====== linking component: ng2-alfresco-datatable =====" -cd "$DIR/../ng2-components/ng2-alfresco-datatable" -npm link ng2-alfresco-core -npm link -npm run build - -#LINK DOCUMENTLIST -echo "====== linking component: ng2-alfresco-documentlist =====" -cd "$DIR/../ng2-components/ng2-alfresco-documentlist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link -npm run build - -#LINK WEBSCRIPT -echo "====== linking component: ng2-alfresco-webscript =====" -cd "$DIR/../ng2-components/ng2-alfresco-webscript" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link -npm run build - -#LINK TASKLIST -echo "====== linking component: ng2-activiti-tasklist =====" -cd "$DIR/../ng2-components/ng2-activiti-tasklist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm link -npm run build - -#LINK PROCESSLIST -echo "====== linking component: ng2-activiti-processlist =====" -cd "$DIR/../ng2-components/ng2-activiti-processlist" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-activiti-form -npm link ng2-activiti-tasklist -npm link -npm run build - -#LINK DIAGRAMS -echo "====== linking component: ng2-activiti-diagrams =====" -cd "$DIR/../ng2-components/ng2-activiti-diagrams" -npm link ng2-alfresco-core -npm link -npm run build - -#LINK ANALYTICS -echo "====== linking component: ng2-activiti-analytics =====" -cd "$DIR/../ng2-components/ng2-activiti-analytics" -npm link ng2-alfresco-core -npm link ng2-activiti-diagrams -npm link -npm run build - -#LINK SEARCH -echo "====== linking component: ng2-alfresco-search =====" -cd "$DIR/../ng2-components/ng2-alfresco-search" -npm link ng2-alfresco-core -npm link ng2-alfresco-datatable -npm link ng2-alfresco-documentlist -npm link -npm run build - -#LINK ALL THE OTHERS COMPONENTS +#LINK ALL THE COMPONENTS 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-userinfo \ - ng2-alfresco-upload \ + ng2-alfresco-search \ ng2-alfresco-tag \ - ng2-alfresco-viewer + ng2-alfresco-upload \ + ng2-alfresco-viewer \ + ng2-alfresco-webscript \ + ng2-alfresco-userinfo do DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== linking component: ${PACKAGE} =====" cd "$DESTDIR" - npm link ng2-alfresco-core + npm travis npm link - npm run build done - -#LINK ALL THE COMPONENTS INSIDE THE DEMOSHELL +#LINK ALL THE COMPONENTS INSIDE THE DEMO-SHELL cd "$DIR/../demo-shell-ng2" for PACKAGE in \ ng2-activiti-diagrams \ diff --git a/scripts/start-linked.sh b/scripts/start-linked.sh deleted file mode 100755 index 1c0529c063..0000000000 --- a/scripts/start-linked.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -"$DIR/npm-link-demo-shell.sh" - -cd "$DIR/../demo-shell-ng2" - -if [[ $1 = "-install" ]]; then - npm install - npm run start -elif [[ $1 = "-update " ]]; then - npm run update - npm run start -elif [[ $1 = "-cleanInstall" ]]; then - npm run clean - npm install - npm run start -else - npm run start -fi diff --git a/scripts/start.sh b/scripts/start.sh index 33f93b05d8..fbffd9ac9d 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -4,16 +4,52 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR/../demo-shell-ng2" -if [[ $1 = "-install" ]]; then +show_help() { + echo "Usage: start.sh" + echo "" + 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 "-l or -link all the ng2-components in the demo shell and start the the demo shell" +} + +install() { npm install - npm run start -elif [[ $1 = "-update " ]]; then +} + +update() { + echo "update" npm run update - npm run start -elif [[ $1 = "-cleanInstall" ]]; then +} + +cleanInstall() { npm run clean npm install - npm run start -else - npm run start -fi +} + +link() { + echo "link" + "$DIR/npm-link-demo-shell.sh" +} + +eval OPTIONS=$1 + +while [[ $1 == -* ]]; do + case "$1" in + -l|--link) link; shift;; + -*) shift;; + esac + +done + +while [[ $OPTIONS == -* ]]; do + case "$OPTIONS" in + -h|--help|-\?) show_help; exit 0;; + -i|--install) install; shift;; + -u|--update) update; shift;; + -c|--cleanInstall) cleanInstall; shift;; + -*) echo "invalid option: $1" 1>&2; show_help; exit 1;; + esac +done + +npm run start diff --git a/scripts/update-version.sh b/scripts/update-version.sh index 3316cee0b1..c59aa6d4ad 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -63,8 +63,6 @@ echo "====== UPDATE VERSION OF DEMO-SHELL to ${VERSION} version ======" sed -i '' "s/\"version\": \"[0-9]\\.[0-9]\\.[0-9]\"/\"version\": \"${VERSION}\"/g" ${DIR}/../demo-shell-ng2/package.json - - for PACKAGE in \ ng2-activiti-diagrams \ ng2-activiti-analytics \