diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index a527db03bf..418b2a7b4b 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -1,7 +1,7 @@ { "name": "Alfresco-Angular2-Demo", "description": "Demo shell for Alfresco Angular2 components", - "version": "0.1.0", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf node_modules typings", @@ -76,13 +76,13 @@ "flag-icon-css": "2.3.0", "alfresco-js-api": "^0.1.0", - "ng2-alfresco-core": "0.0.0-PLACEHOLDER", - "ng2-alfresco-datatable": "0.0.0-PLACEHOLDER", - "ng2-alfresco-documentlist": "0.0.0-PLACEHOLDER", - "ng2-alfresco-login": "0.0.0-PLACEHOLDER", - "ng2-alfresco-search": "0.0.0-PLACEHOLDER", - "ng2-alfresco-upload": "0.0.0-PLACEHOLDER", - "ng2-alfresco-viewer": "0.0.0-PLACEHOLDER" + "ng2-alfresco-core": "0.2.0", + "ng2-alfresco-datatable": "0.2.0", + "ng2-alfresco-documentlist": "0.2.0", + "ng2-alfresco-login": "0.2.0", + "ng2-alfresco-search": "0.2.0", + "ng2-alfresco-upload": "0.2.0", + "ng2-alfresco-viewer": "0.2.0" }, "devDependencies": { "browser-sync": "2.10.0", diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index e0227b50a4..38aba7eff9 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-core", "description": "Alfresco Angular 2 Components core", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index ff9c52e1da..37d73b0a64 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-datatable", "description": "Alfresco Angular2 DataTable Component", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 02701be465..010e615fd2 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-documentlist", "description": "Alfresco Angular2 Document List Component", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", @@ -74,9 +74,9 @@ "zone.js": "0.6.12", "rimraf": "2.5.2", "ng2-translate": "2.2.2", - "alfresco-js-api": "^0.1.0", - "ng2-alfresco-core": "0.0.0-PLACEHOLDER", - "ng2-alfresco-datatable": "0.0.0-PLACEHOLDER" + "ng2-alfresco-core": "0.2.0", + "ng2-alfresco-datatable": "0.2.0", + "alfresco-js-api": "^0.1.0" }, "peerDependencies": { "material-design-icons": "^2.2.3", diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 0ca5687ec8..abde89f5bf 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-login", "description": "Alfresco Angular2 Login Component", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", @@ -82,7 +82,7 @@ "zone.js": "0.6.12", "rimraf": "2.5.2", "ng2-translate": "2.2.2", - "ng2-alfresco-core": "0.0.0-PLACEHOLDER", + "ng2-alfresco-core": "0.2.0", "alfresco-js-api": "^0.1.0", "coveralls": "^2.11.9" }, diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index 1897c09d80..de70053881 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-search", "description": "Alfresco Angular2 Search Component", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", @@ -76,7 +76,7 @@ "ng2-translate": "2.2.2", "material-design-lite": "1.1.3", "alfresco-js-api": "^0.1.0", - "ng2-alfresco-core": "0.0.0-PLACEHOLDER" + "ng2-alfresco-core": "0.2.0" }, "peerDependencies": { "material-design-icons": "^2.2.3", diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index e9b81ead71..f0f74ca9ef 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-upload", "description": "Alfresco Angular2 Upload Component", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", @@ -78,7 +78,7 @@ "rimraf": "2.5.2", "ng2-translate": "2.2.2", "alfresco-js-api": "^0.1.0", - "ng2-alfresco-core": "0.0.0-PLACEHOLDER" + "ng2-alfresco-core": "0.2.0" }, "peerDependencies": { "material-design-icons": "^2.2.3", diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index 24866e44b7..41c8d9b730 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-viewer", "description": "Alfresco documents viewer", - "version": "0.0.0-PLACEHOLDER", + "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { "clean": "rimraf dist node_modules typings", diff --git a/scripts/README.md b/scripts/README.md index 191d33878c..a3a4f48b7b 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -34,4 +34,11 @@ feel for what's available. ./start.sh -update ``` +* 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 +``` + For development environment configuration please refer to [project docs](demo-shell-ng2/README.md). \ No newline at end of file diff --git a/scripts/npm-clean.sh b/scripts/npm-clean.sh index 463757af0f..7bfe5ff60e 100755 --- a/scripts/npm-clean.sh +++ b/scripts/npm-clean.sh @@ -18,3 +18,5 @@ done cd "$DIR/../demo-shell-ng2" npm run clean + +cd ${DIR} \ No newline at end of file diff --git a/scripts/npm-publish.sh b/scripts/npm-publish.sh index 5593809e17..42a263a6b2 100755 --- a/scripts/npm-publish.sh +++ b/scripts/npm-publish.sh @@ -2,6 +2,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +"$DIR/npm-clean.sh" + for PACKAGE in \ ng2-alfresco-core \ ng2-alfresco-datatable \ @@ -13,5 +15,8 @@ for PACKAGE in \ do DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== PUBLISHING: ${DESTDIR} =====" - npm publish ${DESTDIR} + cd ${DESTDIR} + npm install + npm publish + cd ${DIR} done diff --git a/scripts/start-linked.sh b/scripts/start-linked.sh new file mode 100755 index 0000000000..1c0529c063 --- /dev/null +++ b/scripts/start-linked.sh @@ -0,0 +1,21 @@ +#!/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 8984114d26..33f93b05d8 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -2,22 +2,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -for PACKAGE in \ - ng2-alfresco-core \ - ng2-alfresco-datatable \ - ng2-alfresco-documentlist \ - ng2-alfresco-login \ - ng2-alfresco-search \ - ng2-alfresco-upload \ - ng2-alfresco-viewer -do - cd "$DIR/../ng2-components/${PACKAGE}"; npm version patch -done - -"$DIR/update-version.sh" ^0.1.0 - -"$DIR/npm-link-demo-shell.sh" - cd "$DIR/../demo-shell-ng2" if [[ $1 = "-install" ]]; then diff --git a/scripts/update-version.sh b/scripts/update-version.sh index 7033f1a294..168e5bf685 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + set -ex cd `dirname $0` @@ -12,5 +14,34 @@ then exit 1 fi -echo "====== RENAMING 0.0.0-PLACEHOLDER to N.N.N version ======" -find ././../ -type f -name package.json -print0 | xargs -0 sed -i '' "s/0\\.0\\.0-PLACEHOLDER/${VERSION}/g" \ No newline at end of file +for PACKAGE in \ + ng2-alfresco-core \ + ng2-alfresco-datatable \ + ng2-alfresco-documentlist \ + ng2-alfresco-login \ + ng2-alfresco-search \ + ng2-alfresco-upload \ + ng2-alfresco-viewer +do + DESTDIR="$DIR/../ng2-components/${PACKAGE}" + echo "====== UPDATE VERSION of ${PACKAGE} to ${VERSION} version in all the package.json ======" + find ././../ -type f -name package.json -print0 | xargs -0 sed -i '' "s/\"${PACKAGE}\": \"0\\.2\\.0\"/\"${PACKAGE}\": \"${VERSION}\"/g" +done + +for PACKAGE in \ + ng2-alfresco-core \ + ng2-alfresco-datatable \ + ng2-alfresco-documentlist \ + ng2-alfresco-login \ + ng2-alfresco-search \ + ng2-alfresco-upload \ + ng2-alfresco-viewer +do + DESTDIR="$DIR/../ng2-components/${PACKAGE}" + echo "====== UPDATE VERSION OF ${PACKAGE} to ${VERSION} version ======" + sed -i '' "s/\"version\": \"0\\.2\\.0\"/\"version\": \"${VERSION}\"/g" ${DESTDIR}/package.json +done + +echo "====== UPDATE VERSION OF DEMO-SHELL to ${VERSION} version ======" + +sed -i '' "s/\"version\": \"0\\.2\\.0\"/\"version\": \"${VERSION}\"/g" ${DIR}/../demo-shell-ng2/package.json \ No newline at end of file