Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 9075700

Browse files
committed
remove exmpl postinstall
1 parent d559282 commit 9075700

7 files changed

Lines changed: 87 additions & 3 deletions

File tree

.github/workflows/e2e-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Install node_modules
6161
working-directory: exmpl
62-
run: yarn install
62+
run: yarn install && yarn rn-setup
6363

6464
- name: Use specific Java version for sdkmanager to work
6565
uses: actions/setup-java@v2

.github/workflows/e2e-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install Dependencies
5858
if: steps.cache-nm.outputs.cache-hit != 'true'
5959
working-directory: exmpl
60-
run: yarn install
60+
run: yarn install && yarn rn-setup
6161

6262
# - name: Activate react-native-skia-stup
6363
# run: |

exmpl/.eslintignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules
2+
nodejs-assets/*
3+
ios/*
4+
android/*
5+
!.eslintrc.js
6+
metro.config.js
7+
postinstall.js
8+
__mocks__/**
9+
coverage
10+
rn-setup.js
11+
12+
src/utils/backup/protos

exmpl/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# react-native-ldk-example
2+
3+
### Description
4+
This is an example project for [`react-native-ldk`](https://github.com/synonymdev/react-native-ldk).
5+
6+
### Getting started
7+
8+
#### 1. Clone & Install
9+
```bash
10+
git clone git@github.com:synonymdev/react-native-ldk.git && cd react-native-ldk/lib/ && yarn install && yarn build && cd ../exmpl && yarn install && yarn rn-setup
11+
````
12+
#### 2. Spin up [Polar](https://github.com/jamaljsr/polar) or a Lightning node of your choosing and connect an Electrum Server to it.
13+
#### 3. Update the Lightning node and Electrum server info in `exmpl/utils/constants.ts`.
14+
#### 4. Run iOS or Android
15+
```bash
16+
yarn ios
17+
#or
18+
yarn android
19+
```

exmpl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
2020
"reinstall": "cd ../lib/ && yarn install && yarn build && cd ../example/ && yarn add ../lib && yarn rn-setup",
2121
"clean": "rm -rf node_modules ios/Pods ios/Podfile.lock ios/build && yarn install && cd ios && pod deintegrate && pod install && cd ../",
22-
"postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm,process --hack"
22+
"rn-setup": "node rn-setup.js"
2323
},
2424
"dependencies": {
2525
"@react-native-async-storage/async-storage": "1.17.10",

exmpl/rn-setup.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var exec = require('child_process').exec;
2+
var os = require('os');
3+
4+
const baseCommand =
5+
'rn-nodeify --install buffer,stream,assert,events,crypto,vm,process --hack';
6+
7+
function postInstallMac() {
8+
exec(`${baseCommand} && cd ios && pod install && cd ..`);
9+
}
10+
function postInstallLinWin() {
11+
exec(baseCommand);
12+
}
13+
14+
if (os.type() === 'Darwin') {
15+
postInstallMac();
16+
} else {
17+
postInstallLinWin();
18+
}

exmpl/tsconfig.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"allowSyntheticDefaultImports": true,
5+
"esModuleInterop": true,
6+
"isolatedModules": false,
7+
"resolveJsonModule": true,
8+
"noImplicitAny": false,
9+
"jsx": "react",
10+
"lib": [
11+
"es6",
12+
"es2017",
13+
"esnext",
14+
"dom"
15+
],
16+
"moduleResolution": "node",
17+
"noEmit": true,
18+
"strict": true,
19+
"target": "esnext",
20+
"skipLibCheck": true,
21+
"strictNullChecks": true,
22+
"strictFunctionTypes": true,
23+
"strictPropertyInitialization": true,
24+
"noImplicitThis": true,
25+
"alwaysStrict": true,
26+
"removeComments": true,
27+
"useUnknownInCatchVariables": false
28+
},
29+
"exclude": [
30+
"node_modules",
31+
"babel.config.js",
32+
"metro.config.js",
33+
"jest.config.js"
34+
]
35+
}

0 commit comments

Comments
 (0)