Skip to content

Commit 97dd46d

Browse files
committed
docs: update README
1 parent 3693366 commit 97dd46d

File tree

4 files changed

+391
-37
lines changed

4 files changed

+391
-37
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,77 +4,73 @@ We want this community to be friendly and respectful to each other. Please follo
44

55
## Development workflow
66

7-
To get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies for each package and locally link the library:
7+
This project uses [yarn workspaces](https://yarnpkg.com/features/workspaces).
8+
9+
To get started with the project, run `yarn` in the root directory to install the required dependencies for all packages and examples:
810

911
```sh
10-
yarn bootstrap
12+
yarn
1113
```
1214

13-
> 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.
14-
15-
While developing, you can run the [example app](/example/example) and [next app with ssr](/example/next-example) to test your changes. Any changes you make in the library's JavaScript code will be reflected in the example app without a rebuild. If you change any macro code, then you'll need to rebuild the macro using:
15+
While developing, you can run the [expo app](/examples/expo) and [next app with ssr](/examples/next) to test your changes. For changes in `react-native-tailwind.macro` to take effect in the example apps, you need to rebuild the library using:
1616

1717
```sh
18-
yarn prepare
19-
20-
# In the expo example directory
21-
yarn clean
22-
23-
# In the next example directory
24-
yarn clean
18+
yarn workspace react-native-tailwind.macro build
2519
```
2620

21+
If you changed any macro code, make sure to restart the example projects in order to clean the babel cache.
22+
2723
Make sure your code passes TypeScript and ESLint. Run the following to verify:
2824

2925
```sh
30-
yarn typescript
31-
yarn lint
26+
yarn workspace react-native-tailwind.macro typescript
27+
yarn workspace react-native-tailwind.macro lint
3228
```
3329

3430
To fix formatting errors, run the following:
3531

3632
```sh
37-
yarn lint --fix
33+
yarn workspace react-native-tailwind.macro lint --fix
3834
```
3935

4036
Remember to add tests for your change if possible. Run the unit tests by:
4137

4238
```sh
43-
yarn test
39+
yarn workspace react-native-tailwind.macro test
4440
```
4541

4642
### Expo Example
4743

4844
To start the packager:
4945

5046
```sh
51-
yarn start
47+
yarn workspace @examples/expo start
5248
```
5349

5450
To run the example app on Android:
5551

5652
```sh
57-
yarn android
53+
yarn workspace @examples/expo android
5854
```
5955

6056
To run the example app on iOS:
6157

6258
```sh
63-
yarn ios
59+
yarn workspace @examples/expo ios
6460
```
6561

6662
To run the example app on Web:
6763

6864
```sh
69-
yarn web
65+
yarn workspace @examples/expo web
7066
```
7167

7268
### Next Example
7369

7470
To start the app:
7571

7672
```sh
77-
yarn start
73+
yarn workspace @examples/next start
7874
```
7975

8076
### Commit message convention
@@ -112,10 +108,9 @@ yarn release
112108

113109
The `package.json` file contains various scripts for common tasks:
114110

115-
- `yarn bootstrap`: setup project by installing all dependencies, links and pods.
116-
- `yarn typescript`: type-check files with TypeScript.
117-
- `yarn lint`: lint files with ESLint.
118-
- `yarn test`: run unit tests with Jest.
111+
- `yarn workspace react-native-tailwind.macro typescript`: type-check files with TypeScript.
112+
- `yarn workspace react-native-tailwind.macro lint`: lint files with ESLint.
113+
- `yarn workspace react-native-tailwind.macro test`: run unit tests with Jest.
119114

120115
### Sending a pull request
121116

0 commit comments

Comments
 (0)