Skip to content

Commit 80cff0c

Browse files
committed
Add cloudinary-core-shrinkwrap.js to release
1 parent eeb2186 commit 80cff0c

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"pretest": "npm run build",
2020
"pretest:all": "npm run build",
2121
"pretest:all:prod": "npm run build",
22-
"copybuilds": "for pkg in core jquery jquery-file-upload; do pkg/copy_deployment ${pkg}; done"
22+
"copybuilds": "for pkg in core jquery jquery-file-upload; do pkg/copy_deployment ${pkg}; done",
23+
"publishnpm": "npm publish && for pkg in core jquery jquery-file-upload; do publish_to_npm ${pkg}; done"
2324
},
2425
"repository": {
2526
"type": "git",

pkg/copy_deployment

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ cp -r ${js_root}/src ${pkg_root}/src &&
1919
cp ${js_root}/dist/cloudinary-${1}.js ${js_root}/dist/cloudinary-${1}.*.js ${js_root}/dist/cloudinary-${1}.*.map ${pkg_root} &&
2020
cp ${js_root}/types/cloudinary-core.d.ts ${pkg_root}/cloudinary-${1}.d.ts &&
2121
if [ ${1} = "core" ]; then
22-
cp ${js_root}/dist/cloudinary-${1}-shrinkwrap.*.js ${js_root}/dist/cloudinary-${1}-shrinkwrap.*.map ${pkg_root}
22+
cp ${js_root}/dist/cloudinary-${1}-shrinkwrap*.js ${js_root}/dist/cloudinary-${1}-shrinkwrap*.map ${pkg_root}
2323
fi
2424
echo "Copied ${1}"

publish_to_npm

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
# Usage $0 package-name
3+
# For example, $0 core
4+
js_root=$(git rev-parse --show-toplevel)
5+
pkg_root=${js_root}/pkg/cloudinary-${1}
6+
7+
if [ ! -d ${js_root} ]; then
8+
echo "Root folder ${pkg_root} does not exist!"
9+
exit 1
10+
fi
11+
12+
if [ ! -d ${pkg_root} ]; then
13+
echo "Package folder ${pkg_root} does not exist!"
14+
exit 1
15+
fi
16+
17+
cd ${pkg_root} &&
18+
npm publish

0 commit comments

Comments
 (0)