-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a686f1
commit fcf73dd
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
alias npx='npx -y' | ||
( | ||
cd crates/stellar-xdr-wasm | ||
# iterates over all targets and builds each on in it's on folder | ||
for TARGET in ${TARGETS:-bundler nodejs web no-modules} ; do | ||
OUT_DIR=pkg/$TARGET | ||
npx wasm-pack build --"${PROFILE:-dev}" \ | ||
--target "$TARGET" \ | ||
--out-dir "$OUT_DIR" \ | ||
--out-name "stellar-xdr-wasm-$TARGET" | ||
( | ||
cd "$OUT_DIR"; | ||
# shellcheck disable=SC2016 | ||
npx node-jq --arg TARGET "stellar-xdr-wasm-$TARGET" \ | ||
'.name = $TARGET' package.json > tmp.json; | ||
mv tmp.json package.json; | ||
npx yalc publish; | ||
) | ||
done | ||
) |