Skip to content

Commit 109f35f

Browse files
authored
feat: monorepo layout (#3)
* refactor: migrate monorepo layout to packages and apps * chore: add @callstack workspace * fix: babel and metro errors
1 parent 3811897 commit 109f35f

79 files changed

Lines changed: 12956 additions & 216 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
path: |
107107
~/.gradle/wrapper
108108
~/.gradle/caches
109-
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
109+
key: ${{ runner.os }}-gradle-${{ hashFiles('apps/example/android/gradle/wrapper/gradle-wrapper.properties') }}
110110
restore-keys: |
111111
${{ runner.os }}-gradle-
112112
@@ -157,7 +157,7 @@ jobs:
157157
- name: Install cocoapods
158158
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
159159
run: |
160-
cd example
160+
cd apps/example
161161
bundle install
162162
bundle exec pod repo update --verbose
163163
bundle exec pod install --project-directory=ios

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ android.iml
4343

4444
# Cocoapods
4545
#
46-
example/ios/Pods
46+
apps/example/ios/Pods
4747

4848
# Ruby
49-
example/vendor/
49+
apps/example/vendor/
5050

5151
# node.js
5252
#

CONTRIBUTING.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ We want this community to be friendly and respectful to each other. Please follo
88

99
This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
1010

11-
- The library package in the root directory.
12-
- An example app in the `example/` directory.
11+
- The library package in `packages/react-native-release-inspector`.
12+
- An example app in `apps/example`.
1313

1414
To get started with the project, make sure you have the correct version of [Node.js](https://nodejs.org/) installed. See the [`.nvmrc`](./.nvmrc) file for the version used in this project.
1515

@@ -21,13 +21,13 @@ yarn
2121

2222
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development without manually migrating.
2323
24-
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
24+
The [example app](/apps/example/) demonstrates usage of the library. You need to run it to test any changes you make.
2525

2626
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
2727

28-
If you want to use Android Studio or Xcode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/ReleaseInspectorExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > react-native-release-inspector`.
28+
If you want to use Android Studio or Xcode to edit the native code, you can open the `apps/example/android` or `apps/example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `apps/example/ios/ReleaseInspectorExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > react-native-release-inspector`.
2929

30-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-release-inspector` under `Android`.
30+
To edit the Java or Kotlin files, open `apps/example/android` in Android studio and find the source files at `react-native-release-inspector` under `Android`.
3131

3232
You can use various commands from the root directory to work with the project.
3333

@@ -81,7 +81,6 @@ Remember to add tests for your change if possible. Run the unit tests by:
8181
yarn test
8282
```
8383

84-
8584
### Commit message convention
8685

8786
We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
@@ -95,19 +94,18 @@ We follow the [conventional commits specification](https://www.conventionalcommi
9594

9695
Our pre-commit hooks verify that your commit message matches this format when committing.
9796

98-
9997
### Scripts
10098

101-
The `package.json` file contains various scripts for common tasks:
99+
The root `package.json` file contains script delegates for common tasks:
102100

103101
- `yarn`: setup project by installing dependencies.
104102
- `yarn typecheck`: type-check files with TypeScript.
105-
- `yarn lint`: lint files with [ESLint](https://eslint.org/).
106-
- `yarn test`: run unit tests with [Jest](https://jestjs.io/).
107-
- `yarn example start`: start the Metro server for the example app.
103+
- `yarn lint`: lint files with [ESLint](https://eslint.org/).
104+
- `yarn test`: run unit tests with [Jest](https://jestjs.io/).
105+
- `yarn example start`: start the Metro server for the example app.
108106
- `yarn example android`: run the example app on Android.
109107
- `yarn example ios`: run the example app on iOS.
110-
108+
111109
### Sending a pull request
112110

113111
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@ Profile React Native App in Release mode with React DevTools for React.Profiler
44

55
## Installation
66

7-
87
```sh
9-
npm install react-native-release-inspector
8+
npm install @callstack/react-native-release-inspector
109
```
1110

12-
1311
## Usage
1412

15-
1613
```js
17-
import { multiply } from 'react-native-release-inspector';
14+
import { multiply } from '@callstack/react-native-release-inspector';
1815

1916
// ...
2017

2118
const result = multiply(3, 7);
2219
```
2320

21+
## Repository structure
22+
23+
- Library package: `packages/react-native-release-inspector`
24+
- Example app: `apps/example`
2425

2526
## Contributing
2627

File renamed without changes.

apps/example/Gemfile.lock

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.8)
5+
activesupport (7.2.3.1)
6+
base64
7+
benchmark (>= 0.3)
8+
bigdecimal
9+
concurrent-ruby (~> 1.0, >= 1.3.1)
10+
connection_pool (>= 2.2.5)
11+
drb
12+
i18n (>= 1.6, < 2)
13+
logger (>= 1.4.2)
14+
minitest (>= 5.1, < 6)
15+
securerandom (>= 0.3)
16+
tzinfo (~> 2.0, >= 2.0.5)
17+
addressable (2.9.0)
18+
public_suffix (>= 2.0.2, < 8.0)
19+
algoliasearch (1.27.5)
20+
httpclient (~> 2.8, >= 2.8.3)
21+
json (>= 1.5.1)
22+
atomos (0.1.3)
23+
base64 (0.3.0)
24+
benchmark (0.5.0)
25+
bigdecimal (4.1.2)
26+
claide (1.1.0)
27+
cocoapods (1.15.2)
28+
addressable (~> 2.8)
29+
claide (>= 1.0.2, < 2.0)
30+
cocoapods-core (= 1.15.2)
31+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
32+
cocoapods-downloader (>= 2.1, < 3.0)
33+
cocoapods-plugins (>= 1.0.0, < 2.0)
34+
cocoapods-search (>= 1.0.0, < 2.0)
35+
cocoapods-trunk (>= 1.6.0, < 2.0)
36+
cocoapods-try (>= 1.1.0, < 2.0)
37+
colored2 (~> 3.1)
38+
escape (~> 0.0.4)
39+
fourflusher (>= 2.3.0, < 3.0)
40+
gh_inspector (~> 1.0)
41+
molinillo (~> 0.8.0)
42+
nap (~> 1.0)
43+
ruby-macho (>= 2.3.0, < 3.0)
44+
xcodeproj (>= 1.23.0, < 2.0)
45+
cocoapods-core (1.15.2)
46+
activesupport (>= 5.0, < 8)
47+
addressable (~> 2.8)
48+
algoliasearch (~> 1.0)
49+
concurrent-ruby (~> 1.1)
50+
fuzzy_match (~> 2.0.4)
51+
nap (~> 1.0)
52+
netrc (~> 0.11)
53+
public_suffix (~> 4.0)
54+
typhoeus (~> 1.0)
55+
cocoapods-deintegrate (1.0.5)
56+
cocoapods-downloader (2.1)
57+
cocoapods-plugins (1.0.0)
58+
nap
59+
cocoapods-search (1.0.1)
60+
cocoapods-trunk (1.6.0)
61+
nap (>= 0.8, < 2.0)
62+
netrc (~> 0.11)
63+
cocoapods-try (1.2.0)
64+
colored2 (3.1.2)
65+
concurrent-ruby (1.3.3)
66+
connection_pool (3.0.2)
67+
drb (2.2.3)
68+
escape (0.0.4)
69+
ethon (0.18.0)
70+
ffi (>= 1.15.0)
71+
logger
72+
ffi (1.17.4)
73+
fourflusher (2.3.1)
74+
fuzzy_match (2.0.4)
75+
gh_inspector (1.1.3)
76+
httpclient (2.9.0)
77+
mutex_m
78+
i18n (1.14.8)
79+
concurrent-ruby (~> 1.0)
80+
json (2.19.5)
81+
logger (1.7.0)
82+
minitest (5.27.0)
83+
molinillo (0.8.0)
84+
mutex_m (0.3.0)
85+
nanaimo (0.3.0)
86+
nap (1.1.0)
87+
netrc (0.11.0)
88+
nkf (0.2.0)
89+
public_suffix (4.0.7)
90+
rexml (3.4.4)
91+
ruby-macho (2.5.1)
92+
securerandom (0.4.1)
93+
typhoeus (1.6.0)
94+
ethon (>= 0.18.0)
95+
tzinfo (2.0.6)
96+
concurrent-ruby (~> 1.0)
97+
xcodeproj (1.25.1)
98+
CFPropertyList (>= 2.3.3, < 4.0)
99+
atomos (~> 0.1.3)
100+
claide (>= 1.0.2, < 2.0)
101+
colored2 (~> 3.1)
102+
nanaimo (~> 0.3.0)
103+
rexml (>= 3.3.6, < 4.0)
104+
105+
PLATFORMS
106+
ruby
107+
108+
DEPENDENCIES
109+
activesupport (>= 6.1.7.5, != 7.1.0)
110+
benchmark
111+
bigdecimal
112+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
113+
concurrent-ruby (< 1.3.4)
114+
logger
115+
mutex_m
116+
nkf
117+
xcodeproj (< 1.26.0)
118+
119+
RUBY VERSION
120+
ruby 3.3.6p108
121+
122+
BUNDLED WITH
123+
2.5.22
File renamed without changes.

0 commit comments

Comments
 (0)