Skip to content

Commit 49109e2

Browse files
Merge pull request #12 from synonymdev/directory-restructure
Directory restructure
2 parents cdc6eb5 + b5cc038 commit 49109e2

File tree

89 files changed

+83
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+83
-25
lines changed

.github/workflows/e2e-ios.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ jobs:
2424
uses: actions/cache@v3
2525
id: lib-npmcache
2626
with:
27-
path: node_modules
27+
path: lib/node_modules
2828
key: node-modules-${{ hashFiles('**/yarn.lock') }}
2929

3030
- name: Install lib dependencies
3131
if: steps.lib-npmcache.outputs.cache-hit != 'true'
32+
working-directory: lib
3233
run: yarn install
3334

3435
- name: Build lib
36+
working-directory: lib
3537
run: yarn build
3638

3739
- name: Cache app node modules
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: example-lint-check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'master'
7+
8+
defaults:
9+
run:
10+
working-directory: example
11+
12+
jobs:
13+
eslint:
14+
name: Run lint check
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out Git repository
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: 14
25+
26+
- name: Cache node modules
27+
uses: actions/cache@v3
28+
id: npmcache
29+
with:
30+
path: example/node_modules
31+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
32+
33+
- name: Install example dependencies
34+
if: steps.npmcache.outputs.cache-hit != 'true'
35+
run: yarn install
36+
37+
- name: Lint check
38+
run: yarn lint:check
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
name: lint-check
1+
name: lib-lint-check
22

33
on:
44
pull_request:
55
branches:
66
- 'master'
77

8+
defaults:
9+
run:
10+
working-directory: lib
11+
812
jobs:
913
eslint:
1014
name: Run lint check
@@ -19,7 +23,15 @@ jobs:
1923
with:
2024
node-version: 14
2125

22-
- name: Install Node.js dependencies
26+
- name: Cache node modules
27+
uses: actions/cache@v3
28+
id: npmcache
29+
with:
30+
path: lib/node_modules
31+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
32+
33+
- name: Install lib dependencies
34+
if: steps.npmcache.outputs.cache-hit != 'true'
2335
run: yarn install
2436

2537
- name: Lint check

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
node_modules/
21
.idea/
3-
src/protos/*.ts
4-
src/protos/*.js
5-
dist/
6-
**.DS_Store
7-
android/build/
8-
android/local.properties
9-
android/.gradle/
10-
yarn-error.log
11-
example/.watchman*
12-
example/*.log
2+
**/.DS_Store

example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ buck-out/
5959
# Ruby / CocoaPods
6060
/ios/Pods/
6161
/vendor/bundle/
62+
63+
.watchman*

example/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@react-native-async-storage/async-storage": "^1.17.6",
1919
"@react-native-clipboard/clipboard": "^1.10.0",
20-
"@synonymdev/react-native-ldk": "../",
20+
"@synonymdev/react-native-ldk": "../lib",
2121
"assert": "^2.0.0",
2222
"bitcoinjs-lib": "^6.0.1",
2323
"buffer": "^6.0.3",
@@ -45,6 +45,8 @@
4545
"babel-jest": "^26.6.3",
4646
"detox": "^19.7.1",
4747
"eslint": "^8.17.0",
48+
"eslint-config-prettier": "^8.5.0",
49+
"prettier": "^2.6.2",
4850
"jest": "^26.6.3",
4951
"jest-circus": "^26.6.3",
5052
"metro-react-native-babel-preset": "^0.67.0",

example/yarn.lock

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@
13261326
dependencies:
13271327
"@sinonjs/commons" "^1.7.0"
13281328

1329-
"@synonymdev/react-native-ldk@../":
1329+
"@synonymdev/react-native-ldk@../lib":
13301330
version "0.0.43"
13311331

13321332
"@tootallnate/once@1":
@@ -3116,7 +3116,7 @@ escodegen@^2.0.0:
31163116
optionalDependencies:
31173117
source-map "~0.6.1"
31183118

3119-
eslint-config-prettier@^8.3.0:
3119+
eslint-config-prettier@^8.3.0, eslint-config-prettier@^8.5.0:
31203120
version "8.5.0"
31213121
resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz"
31223122
integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==
@@ -6211,6 +6211,11 @@ prettier-linter-helpers@^1.0.0:
62116211
dependencies:
62126212
fast-diff "^1.1.2"
62136213

6214+
prettier@^2.6.2:
6215+
version "2.7.1"
6216+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
6217+
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
6218+
62146219
pretty-format@^26.5.2, pretty-format@^26.6.2:
62156220
version "26.6.2"
62166221
resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz"
File renamed without changes.
File renamed without changes.

lib/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
.idea/
3+
src/protos/*.ts
4+
src/protos/*.js
5+
dist/
6+
**.DS_Store
7+
android/build/
8+
android/local.properties
9+
android/.gradle/
10+
yarn-error.log

0 commit comments

Comments
 (0)