Skip to content

Commit

Permalink
Add cloudinary-core-shrinkwrap.js to release
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmaoz committed Aug 5, 2019
1 parent eeb2186 commit 80cff0c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"pretest": "npm run build",
"pretest:all": "npm run build",
"pretest:all:prod": "npm run build",
"copybuilds": "for pkg in core jquery jquery-file-upload; do pkg/copy_deployment ${pkg}; done"
"copybuilds": "for pkg in core jquery jquery-file-upload; do pkg/copy_deployment ${pkg}; done",
"publishnpm": "npm publish && for pkg in core jquery jquery-file-upload; do publish_to_npm ${pkg}; done"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion pkg/copy_deployment
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ cp -r ${js_root}/src ${pkg_root}/src &&
cp ${js_root}/dist/cloudinary-${1}.js ${js_root}/dist/cloudinary-${1}.*.js ${js_root}/dist/cloudinary-${1}.*.map ${pkg_root} &&
cp ${js_root}/types/cloudinary-core.d.ts ${pkg_root}/cloudinary-${1}.d.ts &&
if [ ${1} = "core" ]; then
cp ${js_root}/dist/cloudinary-${1}-shrinkwrap.*.js ${js_root}/dist/cloudinary-${1}-shrinkwrap.*.map ${pkg_root}
cp ${js_root}/dist/cloudinary-${1}-shrinkwrap*.js ${js_root}/dist/cloudinary-${1}-shrinkwrap*.map ${pkg_root}
fi
echo "Copied ${1}"
18 changes: 18 additions & 0 deletions publish_to_npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Usage $0 package-name
# For example, $0 core
js_root=$(git rev-parse --show-toplevel)
pkg_root=${js_root}/pkg/cloudinary-${1}

if [ ! -d ${js_root} ]; then
echo "Root folder ${pkg_root} does not exist!"
exit 1
fi

if [ ! -d ${pkg_root} ]; then
echo "Package folder ${pkg_root} does not exist!"
exit 1
fi

cd ${pkg_root} &&
npm publish

0 comments on commit 80cff0c

Please sign in to comment.