More contribution docs
This commit is contained in:
parent
c336d2e397
commit
ef91bf7229
2 changed files with 21 additions and 27 deletions
|
@ -56,7 +56,7 @@ $ yarn serve
|
||||||
|
|
||||||
The playground is a bunch of ready-made projects that you can run to experiment with Theatre.js.
|
The playground is a bunch of ready-made projects that you can run to experiment with Theatre.js.
|
||||||
|
|
||||||
It uses a single ESBuild config to build all of the related packages in one go, so you don't have to run a bunch of build commands.
|
It uses a single ESBuild config to build all of the related packages in one go, so you don't have to run a bunch of build commands separately.
|
||||||
|
|
||||||
Read more at [`./packages/playground/README.md`](./packages/playground/README.md).
|
Read more at [`./packages/playground/README.md`](./packages/playground/README.md).
|
||||||
|
|
||||||
|
@ -67,21 +67,23 @@ Read more at [`./packages/playground/README.md`](./packages/playground/README.md
|
||||||
* `@theatre/studio` – The visual editor.
|
* `@theatre/studio` – The visual editor.
|
||||||
* Location: [`./theatre/studio`](./theatre/studio)
|
* Location: [`./theatre/studio`](./theatre/studio)
|
||||||
* `@theatre/dataverse` – The reactive dataflow library.
|
* `@theatre/dataverse` – The reactive dataflow library.
|
||||||
* Location: [`./packagtes/dataverse`](./packages/dataverse)
|
* Location: [`./packages/dataverse`](./packages/dataverse)
|
||||||
* `@theatre/react` – Utilities for using Theatre with React.
|
* `@theatre/react` – Utilities for using Theatre with React.
|
||||||
* Location: [`./packagtes/react`](./packages/react)
|
* Location: [`./packages/react`](./packages/react)
|
||||||
* `@theatre/r3f` – The react-three-fiber extension.
|
* `@theatre/r3f` – The react-three-fiber extension.
|
||||||
* Location: [`./packagtes/r3f`](./packages/r3f)
|
* Location: [`./packages/r3f`](./packages/r3f)
|
||||||
* `playground` – The quickest way to hack on the internals of Theatre. It bundles all the related packages together with one ESBuild setup.
|
* `playground` – The quickest way to hack on the internals of Theatre. It bundles all the related packages together with one ESBuild setup.
|
||||||
* Location: [`./packagtes/playground`](./packages/playground)
|
* Location: [`./packages/playground`](./packages/playground)
|
||||||
* `examples/`
|
* `examples/` * A bunch of examples, using Theatre with [parcel](https://parceljs.org), [Create react app](create-react-app.dev), etc.
|
||||||
* A bunch of examples, using Theatre with [parcel](https://parceljs.org) or [Create react app](create-react-app.dev).
|
* `*/devEnv`: Each package may have a `devEnv` folder that holds dev-related files, like bundler configuration, lint config, etc.
|
||||||
|
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
|
|
||||||
#### Root commands
|
#### Root commands
|
||||||
|
|
||||||
|
These commands are available at the root workspace:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Run the playground. It's a shortcut for `cd ./playground; yarn run serve`
|
# Run the playground. It's a shortcut for `cd ./playground; yarn run serve`
|
||||||
yarn playground
|
yarn playground
|
||||||
|
@ -102,24 +104,10 @@ yarn lint:all
|
||||||
yarn lint:all --fix
|
yarn lint:all --fix
|
||||||
```
|
```
|
||||||
|
|
||||||
> Yarn passes all extra parameters to the internal scripts. So, for example, if you wish to run the tests in watch more, you can run `yarn test --watch`.
|
> Yarn passes all extra parameters to the internal scripts. So, for example, if you wish to run the tests in watch mode, you can run `yarn test --watch`.
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
> This section is lacking in instructions (PRs welcome!).
|
|
||||||
|
|
||||||
1. Find (or create) an issue you would like to look at
|
|
||||||
2. Implement the changes & test it against
|
|
||||||
3. Run the tests to ensure that nothing has been broken
|
|
||||||
4. Create a PR & reference the issue 🎉
|
|
||||||
|
|
||||||
If you have any questions or issues along the way, drop a message in the
|
|
||||||
[discord community](https://discord.gg/bm9f8F9Y9N) and maybe someone can help!
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
> This section is lacking in instructions (PRs welcome!).
|
|
||||||
|
|
||||||
The libraries come bundled with typescript definitions with TSDoc comments. You can explore the API if your editor is configured to display TSDoc comments.
|
The libraries come bundled with typescript definitions with TSDoc comments. You can explore the API if your editor is configured to display TSDoc comments.
|
||||||
|
|
||||||
Other references
|
Other references
|
||||||
|
@ -133,8 +121,14 @@ Run tests during development with `yarn test --watch` to re-run tests on file ch
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
> This section is lacking in instructions (PRs welcome!).
|
Other than `playground`, the [`examples/`](./examples) folder contains a few small projects using the bundled version of the library. This means that unlike `playground`, you have to build all the packages before running the examples.
|
||||||
|
|
||||||
## Releasing
|
## Releasing
|
||||||
|
|
||||||
> This section is lacking in instructions (PRs welcome!).
|
Currently all packages (except for [`@theatre/r3f`](./packages/r3f/)) share the same version number. In order to publish to npm, you can run the `release` script from the root of the repo:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ yarn release x.y.z # npm publish version x.y.z
|
||||||
|
$ yarn release x.y.z-dev.w # npm publish version x.y.z-dev.w and tag it as "dev"
|
||||||
|
$ yarn release x.y.z-rc.w # npm publish version x.y.z-rc.w and tag it as "rc"
|
||||||
|
```
|
|
@ -1,12 +1,12 @@
|
||||||
# The playground
|
# The playground
|
||||||
|
|
||||||
The playground is the quickest way to hack on the internals of Theatre. It uses a simple ESBuild config that builds all the related packages in one go, so whether you're changing `@theatre/core` or `@theatre/dataverse`, you can see the results immediately.
|
The playground is the quickest way to hack on the internals of Theatre. It uses a simple ESBuild config that builds all the related packages in one go, so you _don't_ have to run a bunch of build commands separately to start developing.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
Simply run `yarn run serve` in this folder to start the dev server.
|
Simply run `yarn run serve` in this folder to start the dev server.
|
||||||
|
|
||||||
The first time you run `serve`, an `src/index.ts` file will be created. This file won't be comitted to the repo, so you're free to change it.
|
The first time you run `serve`, an `src/index.ts` file will be created. This file is the entry point, and it won't be comitted to the repo, so you're free to change it.
|
||||||
|
|
||||||
There are some shared playgrounds in `src/shared` which are committed to the repo. You can make your own playgrounds in `src/personal` which will be `.gitignore`d.
|
There are some shared playgrounds in `src/shared` which are committed to the repo. You can make your own playgrounds in `src/personal` which will be `.gitignore`d.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue