From 1a1ffc1124efdd34d73c0d6f3baee5087ca5a6b3 Mon Sep 17 00:00:00 2001 From: coreyphillips Date: Thu, 12 Sep 2024 18:38:42 -0400 Subject: [PATCH] docs: update README and package scripts Add local installation instructions to README.md. Update scripts in package.json. --- README.md | 12 ++++++++++++ package.json | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2e67359..63e5820 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index 2c8a573..dcac942 100644 --- a/package.json +++ b/package.json @@ -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",