You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+46-11Lines changed: 46 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,50 @@ Contributions are always welcome, no matter how large or small!
4
4
5
5
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).
6
6
7
-
## Development workflow
7
+
## Development Workflow
8
8
9
-
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
9
+
This project is a monorepo managed using [Yarn Workspaces](https://yarnpkg.com/features/workspaces) with Yarn 4.9.2. It contains the following packages:
10
10
11
-
```sh
12
-
yarn
13
-
```
11
+
- The library package in the root directory.
12
+
- An example app in the `example/` directory.
13
+
14
+
To get started with the project, follow these steps:
15
+
16
+
1.**Ensure Node.js is installed**: Use Node.js 22.12.0 or higher (as specified in `.nvmrc`). Install via [nvm](https://github.com/nvm-sh/nvm) if needed:
17
+
18
+
```sh
19
+
nvm install 22.12.0
20
+
nvm use 22.12.0
21
+
```
22
+
23
+
2.**Enable Corepack**: Yarn 4.9.2 is managed via Corepack, included with Node.js. Enable it to ensure the correct Yarn version:
3. Set up Yarn configuration: In the root directory, configure Yarn 4.9.2 and generate the .yarnrc.yml file:
31
+
32
+
```sh
33
+
yarn set version 4.9.2
34
+
yarn config set nodeLinker node-modules
35
+
yarn config set nmHoistingLimits workspaces
36
+
```
37
+
38
+
4.**Install dependencies**: Install dependencies for all packages:
14
39
15
-
> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
40
+
```sh
41
+
yarn
42
+
```
16
43
17
-
While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
44
+
> Important: This project relies on Yarn Workspaces and Yarn 4.9.2. Do not use npm or other package managers for development, as they are not compatible with the monorepo setup.
45
+
46
+
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
47
+
48
+
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.
49
+
50
+
You can use various commands from the root directory to work with the project.
18
51
19
52
To start the packager:
20
53
@@ -34,6 +67,12 @@ To run the example app on iOS:
34
67
yarn example ios
35
68
```
36
69
70
+
To run the example app on Web:
71
+
72
+
```sh
73
+
yarn example web
74
+
```
75
+
37
76
Make sure your code passes TypeScript and ESLint. Run the following to verify:
38
77
39
78
```sh
@@ -53,10 +92,6 @@ Remember to add tests for your change if possible. Run the unit tests by:
53
92
yarn test
54
93
```
55
94
56
-
To edit the Objective-C or Swift files, open `example/ios/TreeMultiSelectExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-tree-multi-select`.
57
-
58
-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-tree-multi-select` under `Android`.
0 commit comments