docs: update README and package scripts

Add local installation instructions to README.md.
Update scripts in package.json.
This commit is contained in:
coreyphillips
2024-09-12 18:38:42 -04:00
parent 57aebeab16
commit 1a1ffc1124
2 changed files with 16 additions and 3 deletions

View File

@@ -8,6 +8,18 @@ React Native implementation of [pubky](https://github.com/pubky/pubky)
npm install react-native-pubky
```
## Local Installation
1. Clone & npm install:
```sh
git clone git clone git@github.com:pubky/react-native-pubky.git && cd react-native-pubky && npm i
```
2. Delete the `rust/pubky` directory to prevent a memory error (This step will be removed once pubky is public).
3. Yarn add it to your project:
```sh
yarn add path/to/react-native-pubky
```
## Usage
```js

View File

@@ -45,9 +45,10 @@
"prepare": "bob build",
"release": "release-it",
"reinstall": "npm i && npm run clean && npm run prepare",
"update-bindings:ios": "node setup-ios-bindings.js && npm run reinstall",
"update-bindings:android": "node setup-android-bindings.js && npm i && npm run clean && npm run prepare",
"update-bindings": "npm run update-bindings:ios && npm run update-bindings:android"
"cargo-build": "cd rust && cargo build --release && cd pubky && cargo build --release && cd pubky && cargo build --release && cd ../ && cd pubky-common && cargo build --release && cd ../ && cd pubky-homeserver && cargo build --release && cd ../../../",
"update-bindings:ios": "npm run cargo-build && node setup-ios-bindings.js && npm run reinstall",
"update-bindings:android": "npm run cargo-build && node setup-android-bindings.js && npm run reinstall",
"update-bindings": "npm run cargo-build && npm run update-bindings:ios && npm run update-bindings:android"
},
"keywords": [
"pubky",