-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Faster builds on Node CI tests (#39)
- Loading branch information
1 parent
dfe80d2
commit 636625c
Showing
3 changed files
with
37 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#! /usr/bin/env bash | ||
|
||
# Build script used in Node-only CI tests | ||
|
||
rm -rf pkg pkg_node pkg_web | ||
|
||
###################################### | ||
# ARROW 1 (arrow-rs) the default feature | ||
# Build node version into pkg_node | ||
echo "Building arrow-rs node" | ||
wasm-pack build \ | ||
--dev \ | ||
--out-dir pkg \ | ||
--out-name node \ | ||
--target nodejs | ||
|
||
###################################### | ||
# ARROW 2 turn on the feature manually | ||
# Build node version into pkg2_node | ||
echo "Building arrow2 node" | ||
wasm-pack build \ | ||
--dev \ | ||
--out-dir pkg2_node \ | ||
--out-name node2 \ | ||
--target nodejs \ | ||
--no-default-features \ | ||
--features arrow2 | ||
|
||
# Copy files into pkg/ | ||
cp pkg2_node/{node2.d.ts,node2.js,node2_bg.wasm,node2_bg.wasm.d.ts} pkg/ | ||
|
||
# Update files array using JQ | ||
jq '.files += ["node2.d.ts", "node2.js", "node2_bg.wasm", "node2_bg.wasm.d.ts"]' pkg/package.json > pkg/package.json.tmp | ||
# Overwrite existing file | ||
mv pkg/package.json.tmp pkg/package.json |
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