Skip to content

Commit 62ad973

Browse files
Move dist/bindgen to @ruby/wasm-wasi pkg
1 parent e82e395 commit 62ad973

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

packages/npm-packages/ruby-wasm-wasi/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
"test:jest": "NODE_OPTIONS=\"--experimental-wasi-unstable-preview1\" jest --coverage",
2828
"test:unit": "./tools/run-test-unit.mjs",
2929
"format": "prettier --write .",
30+
"build:static": "./tools/pack-bindgen-src.sh ./dist",
3031
"build:rollup": "rollup -c rollup.config.mjs && tsc --build",
31-
"build": "npm run build:rollup"
32+
"build": "npm run build:static && npm run build:rollup"
3233
},
3334
"devDependencies": {
3435
"@babel/core": "^7.19.3",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
if [ $# -ne 1 ]; then
5+
echo "Usage: $0 <dist_dir>"
6+
exit 1
7+
fi
8+
9+
package_dir="$(cd "$(dirname "$0")/.." && pwd)"
10+
dist_dir="$1"
11+
12+
mkdir -p "$dist_dir/bindgen"
13+
find "$package_dir/src/bindgen" -name "*.d.ts" -exec cp {} "$dist_dir/bindgen" \;

packages/npm-packages/ruby-wasm-wasi/tools/pack-static-files.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ package_dir="$(cd "$(dirname "$0")/.." && pwd)"
1010
dist_dir="$1"
1111
repo_dir="$package_dir/../../../"
1212

13-
mkdir -p "$dist_dir/bindgen"
14-
find "$package_dir/src/bindgen" \( -name "*.js" -or -name "*.d.ts" \) -exec cp {} "$dist_dir/bindgen" \;
13+
mkdir -p "$dist_dir"
1514

1615
cp "$repo_dir/LICENSE" "$dist_dir/LICENSE"
1716
cp "$repo_dir/NOTICE" "$dist_dir/NOTICE"

0 commit comments

Comments
 (0)