Skip to content

Commit

Permalink
add CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jun 16, 2024
1 parent 01a43ea commit d8a6ec9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 9 deletions.
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Contributions welcome!

**1. Install**

```shell
git clone git@github.com:vikejs/vike-react
cd vike-react/
pnpm install
```

> [!NOTE]
> See [System requirements](#system-requirements) for how to install pnpm.
**2. Build**

```shell
# Build all packages/*
pnpm build
```

**3. Develop**

To develop (watch & re-build upon file changes):

```shell
cd packages/vike-react # or any other packages/*
pnpm dev
```

In a second shell:

```shell
cd examples/full/ # or any other examples/*
pnpm dev
```

That's it. You can now view and test your modifications.

> [!Warning]
> After changing the source code of `vike-react(-*)`, make sure to **always clear Vite's client cache** with `$ rm -rf examples/full/node_modules/.vite/`. Otherwise you'll get a version mismatch between the server (using the latest build) and the client (using the previous cached build).
> [!Warning]
> When switching Git branches, make sure to **run `pnpm reset`** at the monorepo root: it will re-install and re-build everything. It's required when swtiching to a branch that, for example, requires another Vike version.
<br/>

## System requirements

- Node.js `>=16.0.0`
- pnpm `>=9.0.0`

> [!NOTE]
> To install [pnpm](https://pnpm.io) run:
> ```shell
> npm install -g pnpm
> ```
> (Or see [pnpm.io > Installation](https://pnpm.io/installation#using-npm) for alternative methods.)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[<img src="https://vike.dev/vike-readme.svg" align="right" height="90">](https://vike.dev)
[Vike extensions](https://vike.dev/extensions) for [React](https://react.dev).

# `vike-react*`

[Vike extensions](https://vike.dev/extensions) for [React](https://react.dev):
- `vike-react` ([React](https://react.dev) integration)
- Docs: [`vike.dev/vike-react`](https://vike.dev/vike-react)
- Version history: [CHANGELOG.md](packages/vike-react/CHANGELOG.md)
Expand All @@ -11,3 +8,6 @@
- Docs: [`README.md`](packages/vike-react-query#readme)
- Version history: [CHANGELOG.md](packages/vike-react-query/CHANGELOG.md)
- Source code: [/packages/vike-react-query](packages/vike-react-query)

> [!NOTE]
> The source code is [small, simple, and highly polished](https://vike.dev/vike-react#under-the-hood). Contributing is easy and very much welcome, see [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
7 changes: 2 additions & 5 deletions packages/vike-react/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
Source code of `vike-react`.

See also:
- Docs at [`vike.dev`](https://vike.dev) and [`vike.dev/vike-react`](https://vike.dev/vike-react)
- [CHANGELOG.md](https://github.com/vikejs/vike-react/blob/main/packages/vike-react/CHANGELOG.md)
Docs: [`vike.dev/vike-react`](https://vike.dev/vike-react).
Source code: [GitHub > vikejs/vike-react](https://github.com/vikejs/vike-react).

0 comments on commit d8a6ec9

Please sign in to comment.