mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
fix clean script and build all (#1758)
This commit is contained in:
parent
59ed4ee65d
commit
e8c524176e
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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'",
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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}"
|
||||
|
@ -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}
|
||||
|
@ -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;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user