mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix pacakge json social and add force option publish script
This commit is contained in:
@@ -14,9 +14,7 @@
|
|||||||
"coverage": "npm run test && ../node_modules/wsrv/bin/wsrv -o -p 9875 ./coverage/report",
|
"coverage": "npm run test && ../node_modules/wsrv/bin/wsrv -o -p 9875 ./coverage/report",
|
||||||
"publish:prod": "npm run test && npm publish"
|
"publish:prod": "npm run test && npm publish"
|
||||||
},
|
},
|
||||||
"main": "./index.js",
|
"main": "bundles/ng2-alfresco-social.js",
|
||||||
"module": "./index.js",
|
|
||||||
"typings": "./index.d.ts",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
|
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
|
||||||
|
@@ -3,6 +3,25 @@
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
"$DIR/npm-clean.sh"
|
"$DIR/npm-clean.sh"
|
||||||
|
eval FORCE_PUBLISH=false
|
||||||
|
|
||||||
|
show_help() {
|
||||||
|
echo "Usage: npm-publish.sh"
|
||||||
|
echo ""
|
||||||
|
echo "-f or -force publish the package with force"
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_force(){
|
||||||
|
FORCE_PUBLISH=true
|
||||||
|
}
|
||||||
|
|
||||||
|
while [[ $1 == -* ]]; do
|
||||||
|
case "$1" in
|
||||||
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
|
-f|--force) enable_force; shift;;
|
||||||
|
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
for PACKAGE in \
|
for PACKAGE in \
|
||||||
ng2-alfresco-core \
|
ng2-alfresco-core \
|
||||||
@@ -27,6 +46,11 @@ do
|
|||||||
cd ${DESTDIR}
|
cd ${DESTDIR}
|
||||||
npm run clean
|
npm run clean
|
||||||
npm install
|
npm install
|
||||||
npm run publish:prod
|
if FORCE_PUBLISH == false; then
|
||||||
|
npm run publish:prod
|
||||||
|
fi
|
||||||
|
if FORCE_PUBLISH == true; then
|
||||||
|
npm run test && npm run publish --force || exit 1
|
||||||
|
fi
|
||||||
cd ${DIR}
|
cd ${DIR}
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user