Skip to content

Commit ff36dc3

Browse files
committed
build: update publish script
1 parent 67cd817 commit ff36dc3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

deprecate.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ for PROJECT in $PROJECTS; do
1515
echo "Deprecating ${PROJECT}..."
1616
cargo yank --version "${VERSION}" "${PROJECT}"
1717
done
18+
19+
# npm deprecate
20+
npm deprecate "float-pigment-css@${VERSION}" --registry https://registry.npmjs.org -m "sync with cargo yank"

publish.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ else
5252
exit -1
5353
fi
5454

55+
# run wasm-pack
56+
if wasm-pack build float-pigment-css --target nodejs --features nodejs-package; then
57+
echo 'WebAssembly built for float-pigment-css.'
58+
else
59+
echo 'Failed to build WebAssembly package for float-pigment-css! Abort.'
60+
exit -1
61+
fi
62+
5563
# git operations
5664
if [ -z "$(git status --porcelain)" ]; then
5765
echo 'Git status OK.'
@@ -113,3 +121,9 @@ for PROJECT in $PROJECTS; do
113121
echo "Publishing ${PROJECT}..."
114122
cargo publish -p "${PROJECT}"
115123
done
124+
125+
# npm publish
126+
cd float-pigment-css/pkg
127+
echo "Publishing NPM package for float-pigment-css..."
128+
npm publish --registry https://registry.npmjs.org
129+
cd ../..

0 commit comments

Comments
 (0)