fix clean script and build all (#1758)

This commit is contained in:
Eugenio Romano 2017-03-23 15:51:28 +00:00 committed by Denys Vuika
parent 59ed4ee65d
commit e8c524176e
19 changed files with 85 additions and 52 deletions

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -5,7 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings", "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": "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", "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'", "tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",

View File

@ -47,10 +47,16 @@ in the demo shell:
./npm-buid-all.sh ./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: * If you want to build all your local component and run the test:
```sh ```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: * If you want clean all your local component and the demo shell:

View File

@ -2,54 +2,79 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval RUN_TEST=false 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() { show_help() {
echo "Usage: npm-build-all.sh" echo "Usage: npm-build-all.sh"
echo "" echo ""
echo "-t or -test build all your local component and run also the test on them" 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(){ enable_test(){
RUN_TEST=true RUN_TEST=true
} }
enable_link(){
RUN_LINK=true
}
build_project() { build_project() {
cd $1 cd $1
echo "====== build project: $2 =====" echo "====== build project: $2 ====="
npm install npm install
npm build
if $RUN_TEST == true; then if $RUN_TEST == true; then
npm run test npm run test
fi fi
npm run tsc
npm run build.umd
if $RUN_LINK == true; then
npm run travis
npm link
fi
} }
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
-h|--help|-\?) show_help; exit 0;; -h|--help|-\?) show_help; exit 0;;
-l|--link) enable_link; shift;;
-t|--test) enable_test; shift;; -t|--test) enable_test; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;; -*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac esac
done done
for PACKAGE in \ for PACKAGE in ${projects[@]}
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
do do
DESTDIR="$DIR/../ng2-components/${PACKAGE}" DESTDIR="$DIR/../ng2-components/${PACKAGE}"
build_project $DESTDIR $PACKAGE build_project $DESTDIR $PACKAGE
done 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

View File

@ -2,22 +2,23 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
for PACKAGE in \ eval projects=( "ng2-activiti-diagrams"
ng2-activiti-diagrams \ "ng2-activiti-analytics"
ng2-activiti-analytics \ "ng2-activiti-form"
ng2-alfresco-core \ "ng2-activiti-processlist"
ng2-alfresco-datatable \ "ng2-activiti-tasklist"
ng2-alfresco-documentlist \ "ng2-alfresco-core"
ng2-activiti-form \ "ng2-alfresco-datatable"
ng2-alfresco-login \ "ng2-alfresco-documentlist"
ng2-activiti-processlist \ "ng2-alfresco-login"
ng2-alfresco-search \ "ng2-alfresco-search"
ng2-activiti-tasklist \ "ng2-alfresco-tag"
ng2-alfresco-tag \ "ng2-alfresco-upload"
ng2-alfresco-upload \ "ng2-alfresco-viewer"
ng2-alfresco-userinfo \ "ng2-alfresco-webscript"
ng2-alfresco-viewer \ "ng2-alfresco-userinfo" )
ng2-alfresco-webscript
for PACKAGE in ${projects[@]}
do do
echo "====== clean component: ${PACKAGE} =====" echo "====== clean component: ${PACKAGE} ====="
cd "$DIR/../ng2-components/${PACKAGE}" cd "$DIR/../ng2-components/${PACKAGE}"

View File

@ -24,6 +24,7 @@ do
DESTDIR="$DIR/../ng2-components/${PACKAGE}" DESTDIR="$DIR/../ng2-components/${PACKAGE}"
echo "====== PUBLISHING: ${DESTDIR} =====" echo "====== PUBLISHING: ${DESTDIR} ====="
cd ${DESTDIR} cd ${DESTDIR}
npm run clean
npm install npm install
npm run publish:prod npm run publish:prod
cd ${DIR} cd ${DIR}

View File

@ -32,7 +32,7 @@ link() {
"$DIR/npm-link-demo-shell.sh" "$DIR/npm-link-demo-shell.sh"
} }
eval OPTIONS=$1 eval args=("$@");
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
@ -41,10 +41,10 @@ while [[ $1 == -* ]]; do
esac esac
done done
shift $(expr $OPTIND - 1 ) set -- "${args[@]}";
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$OPTIONS" in case "$1" in
-h|--help|-\?) show_help; exit 0;; -h|--help|-\?) show_help; exit 0;;
-i|--install) install; shift;; -i|--install) install; shift;;
-u|--update) update; shift;; -u|--update) update; shift;;