Skip to content

Commit cdb7f5e

Browse files
committed
add files property for react-native package
1 parent 3737dae commit cdb7f5e

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ yarn-error.log
77
# jest
88
coverage/
99

10-
# tsc
10+
# tsc / build
1111
#
1212
dist
1313
android/build
14+
*.tgz
1415

1516
# OSX
1617
#

examples/RNOneSignalTS/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ This is a new [**React Native**](https://reactnative.dev) project, bootstrapped
44

55
> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
66
7-
Also make sure to run the link command in root:
8-
`bun link`
7+
Run `bun run setup` to package the bundle and use it for the example.
98

109
## Step 1: Start Metro
1110

examples/RNOneSignalTS/bun.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/RNOneSignalTS/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {
6+
"setup": "./setup.sh",
67
"android": "react-native run-android",
78
"ios": "react-native run-ios",
89
"start": "react-native start"
@@ -11,7 +12,7 @@
1112
"@react-native/new-app-screen": "0.81.4",
1213
"react": "19.1.0",
1314
"react-native": "0.81.4",
14-
"react-native-onesignal": "link:react-native-onesignal",
15+
"react-native-onesignal": "file:../../react-native-onesignal.tgz",
1516
"react-native-safe-area-context": "^5.5.2"
1617
},
1718
"devDependencies": {

examples/RNOneSignalTS/setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cd ../../
2+
bun run build
3+
4+
rm react-native-onesignal.tgz
5+
bun pm pack
6+
mv react-native-onesignal-*.tgz react-native-onesignal.tgz

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
"name": "react-native-onesignal",
33
"version": "5.2.14",
44
"description": "React Native OneSignal SDK",
5+
"files": [
6+
"dist",
7+
"android",
8+
"ios",
9+
"react-native-onesignal.podspec",
10+
"README.md",
11+
"LICENSE"
12+
],
513
"main": "dist/index.js",
614
"types": "dist/index.d.ts",
715
"scripts": {

0 commit comments

Comments
 (0)