Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions packages/react-native-audio-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@
"bin": {
"setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"
},
"sideEffects": false,
"exports": {
".": {
"types": "./lib/typescript/index.d.ts",
"react-native": "./src/index.ts",
"import": "./lib/module/index.js",
"require": "./lib/commonjs/index.js",
"default": "./lib/module/index.js"
},
"./app.plugin.js": "./app.plugin.js",
"./package.json": "./package.json"
},
"engines": {
"node": ">=22.0.0"
},
"type": "commonjs",
"source": "src/index",
"main": "lib/module/index.js",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"react-native": "src/index.ts",
"types": "lib/typescript/index.d.ts",
Expand Down Expand Up @@ -71,8 +87,8 @@
"format:android:kotlin": "ktlint -F 'android/src/main/java/**/*.kt'",
"format:ios": "find ios/audioapi/ios -type f \\( -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" \\) | xargs clang-format -i",
"format:common": "find common/cpp/ \\( -path 'common/cpp/audioapi/libs' -prune -o -path 'common/cpp/audioapi/external' -prune -o -type f \\( -iname \"*.h\" -o -iname \"*.cpp\" -o -iname \"*.hpp\" \\) -print \\) | xargs clang-format -i",
"build": "bob build",
"prepare": "bob build",
"build": "./scripts/build.sh",
"prepare": "./scripts/build.sh",
"node:build": "cmake-js compile -d wpt_tests",
"wpt:build": "yarn build && yarn node:build",
"wpt:only": "node ./wpt_tests/wpt/wpt-harness.mjs",
Expand Down Expand Up @@ -174,8 +190,19 @@
"esm": true
}
],
"typescript",
"commonjs"
[
"commonjs",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.json",
"tsc": "../../node_modules/.bin/tsc"
}
]
]
},
"codegenConfig": {
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native-audio-api/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

bob build

echo '{"type": "module"}' > lib/module/package.json
2 changes: 1 addition & 1 deletion packages/react-native-audio-api/scripts/create-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ $# -ge 1 ] && [ "$1" = "generate_nightly_version" ]; then
fi
fi

yarn bob build
yarn build

npm pack

Expand Down
Loading