Skip to content

Commit da8f686

Browse files
updated contributing guide
1 parent 3dd9be4 commit da8f686

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

contributing.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,35 @@ Suggestions and pull requests are highly encouraged. Have a look at the [open is
44

55
## Development
66

7-
To develop the project locally, you'll need a recent version of Node.js and `yarn` v1 installed globally.
7+
To develop the project locally, you'll need a recent version of Node.js and `pnpm` installed globally.
88

9-
To get started, clone the repo and run `yarn` from the root directory:
9+
To get started, clone the repo and run `pnpm` from the root directory:
1010

1111
```bash
1212
git clone https://github.com/NotionX/react-notion-x.git
1313
cd react-notion-x
14-
yarn
14+
pnpm i
1515
```
1616

17-
This will install dependencies and link all of the local packages together using `lerna`. This includes the example projects which will now point to the local version of your packages.
17+
This will install dependencies and link all of the local packages together using `pnpm workspaces`. This includes the example projects which point to the local version of your packages.
1818

19-
```bash
20-
yarn dev
21-
```
22-
23-
This starts compiling the packages into their respective `build` folders. Under the hood, it is running `tsc --watch` and `tsup --watch`, so every time you make a change to one of the packages, the build will be updated automatically as long as this command is running.
19+
### Running development tasks
20+
With development tasks, each package will be compiled into their respective `build` folders. Because they run `tsup --watch`, every time you make a change to one of the packages, the build will be updated automatically as long as this command is running.
2421

25-
With `yarn dev` running in one tab, we recommend opening a second tab and navigating to the `examples/minimal` directory.
22+
We recommend running the `notion-x-example-minimal` example.
2623

2724
```bash
28-
cd examples/minimal
29-
yarn dev
25+
turbo dev --filter=notion-x-example-minimal...
3026
```
3127

32-
Running `yarn dev` from the `examples/minimal` directory will start the example project's Next.js dev server. This project should be using your locally built version of the libraries because they have been linked using `lerna`.
28+
Running `turbo dev` with the package name will start the example project's Next.js dev server. This project should be using your locally built version of the libraries because they have `workspace:*` on its `package.json`. The `...` at the end indicate that the `filter` should also select the package's dependencies.
3329

3430
You should now be able to open `http://localhost:3000` to view and debug the example project.
3531

3632
### Gotchas
3733

38-
Whenever you make a change to one of the packages, the `yarn dev` from the project root will re-compile that package, and the `yarn dev` from the example project's Next.js dev server should hot-reload it in the browser.
34+
Whenever you make a change to one of the packages that's being used by the example, the `turbo dev` command that's running the example project will re-compile that package, and the Next.js dev server should hot-reload it in the browser.
3935

40-
Sometimes, this process gets a little out of whack, and if you're not sure what's going on, I usually just quit one or both of the `yarn dev` commands and restart them.
36+
Sometimes, this process gets a little out of whack, and if you're not sure what's going on, I usually just quit one or both of the `turbo dev` commands and restart it.
4137

42-
If you're seeing something unexpected while debugging one of the Next.js demos, try running `rm -rf .next` to refresh the Next.js cache before running `yarn dev` again.
38+
If you're seeing something unexpected while debugging one of the Next.js demos, try running `turbo clean` to refresh the cache before running `turbo dev` again.

0 commit comments

Comments
 (0)