Skip to content

Commit

Permalink
Add-contributing-guidance (#4707)
Browse files Browse the repository at this point in the history
* Point to `examples/readme.md`

* Make assumptions explicit; add instructions
  • Loading branch information
tsxoxo authored Jan 26, 2024
1 parent 78699ae commit 0afa535
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Pull requests are encouraged. If you want to add a feature or fix a bug:

PRs are reviewed promptly and merged in within a day or two (or even within an hour) if everything looks good.

## Contributing an example

Our [examples](https://github.com/statelyai/xstate/tree/main/examples) are self-contained apps that show how to solve a common problem, integrate another framework (like Vue or Svelte) or build something fun with XState.

To contribute an example, please read the `[readme](https://github.com/statelyai/xstate/blob/main/examples/readme.md)` in the `/examples` folder.

## Submit an issue

Issues and bug reports are also encouraged. If you want to submit an issue:
Expand Down
12 changes: 10 additions & 2 deletions examples/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Contributing an example

1. Start a [new Vite project](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) from this `/examples` directory using the CLI:
These steps assume You've forked the repo and created a branch for your PR. For more info, see the section _Making changes_ in our [CONTRIBUTING.md](https://github.com/statelyai/xstate/blob/main/CONTRIBUTING.md#making-changes).

1. In the CLI, navigate to the `/examples` folder. Start a [new Vite project](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) using the appropiate template (e.g. `react-ts`) and adding the name of the framework at the end of your example's name:

```bash
pnpm create vite@latest my-example-react --template react-ts
Expand All @@ -14,4 +16,10 @@ pnpm i xstate @xstate/react

3. Add your XState-powered demo code ✨

4. Submit a PR!
4. Preview it:

```bash
pnpm run dev
```

5. Submit a PR!

0 comments on commit 0afa535

Please sign in to comment.