-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(CONTRIBUTING): add “Local development” (#136)
- Loading branch information
1 parent
2760e3e
commit d7c70f7
Showing
3 changed files
with
179 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
apps/documentation/src/routes/documentation/contributing/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import MetaTags from '../../../components/meta-tags' | ||
|
||
<MetaTags | ||
title="Tuono - Contributing" | ||
canonical="https://tuono.dev/documentation/contributing" | ||
description="The project is massive - if you like it, do consider contributing!" | ||
/> | ||
|
||
import Breadcrumbs, { Element } from '../../../components/breadcrumbs' | ||
|
||
<Breadcrumbs breadcrumbs={[{ label: '✨ Contributing' }]} /> | ||
|
||
# Contributing | ||
|
||
## TL;DR | ||
|
||
The project is massive - if you like it, do consider contributing! | ||
|
||
## Getting started | ||
|
||
The `tuono` project can mostly be split into the following subdomains: | ||
|
||
- The CLI | ||
- The Rust backend | ||
- The React frontend | ||
- The documentation website (which is written with tuono 🚀) | ||
|
||
To check what the knowledge requirements are for each domain, check the | ||
[requirements](#requirements) section below. | ||
|
||
Currently, I'm keeping a private dashboard to prioritize new features and bug fixes, but if you | ||
want to propose something, please open a new issue on GitHub or reach out to me using | ||
my email address [[email protected]](mailto:[email protected]). I'm also available | ||
on Twitter (X) DMs `@valerioageno`, [Linkedin](https://www.linkedin.com/in/valerioageno) | ||
and discord `@__v__v__`. | ||
|
||
## Requirements | ||
|
||
It's not strictly required to know both React (& typescript) and Rust (even though it | ||
would be a great nice to have). | ||
|
||
Without taking into account specific cases, we can mostly split the domain requirements by: | ||
|
||
- The `CLI` needs Rust knowledge (even though a couple of scenarios might also need Typescript) | ||
- The Backend needs just `Rust` | ||
- The Frontend needs just `React` & `Typescript` | ||
- The documentation website needs just `React` & `Typescript` (or even less, since most of the | ||
code is markdown). | ||
|
||
import NavigationButtons from '../../../components/navigation-buttons' | ||
|
||
<NavigationButtons | ||
next={{ | ||
title: 'Local development', | ||
href: '/documentation/contributing/local-development', | ||
}} | ||
/> |
113 changes: 113 additions & 0 deletions
113
apps/documentation/src/routes/documentation/contributing/local-development.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
import MetaTags from '../../../components/meta-tags' | ||
|
||
<MetaTags | ||
title="Tuono - Contributing - Local development" | ||
canonical="https://tuono.dev/documentation/contributing/local-development" | ||
description="Contribute to Tuono. Learn here how to setup the repository for local development" | ||
/> | ||
|
||
import Breadcrumbs, { Element } from '../../../components/breadcrumbs' | ||
|
||
<Breadcrumbs | ||
breadcrumbs={[ | ||
{ label: '✨ Contributing', href: '/documentation/contributing' }, | ||
{ label: 'Local development' }, | ||
]} | ||
/> | ||
|
||
# Local development | ||
|
||
Thanks for your interest! In this page, you find the instructions to set up `tuono` on your local environment! | ||
|
||
## Setup | ||
|
||
### Fork and clone repository | ||
|
||
After [forking the repo on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo): | ||
|
||
```sh | ||
git clone https://github.com/<your-name-here>/tuono | ||
cd tuono | ||
``` | ||
|
||
### Rust tool chain | ||
|
||
Install the Rust programming language tool chain (`rust` and `cargo`). | ||
Follows instructions in the official [docs](https://rustup.rs/) | ||
|
||
### Node.js — runtime | ||
|
||
Install `Node.js`. | ||
You can follow the instructions from the [Node official site](https://nodejs.org/en/download/package-manager) | ||
|
||
> 💡 This project has a `.nvmrc` file to specify the node version used in development. | ||
> | ||
> Consider to use [nvm](https://github.com/nvm-sh/nvm) so you can run | ||
> | ||
> ```sh | ||
> nvm use | ||
> ``` | ||
> | ||
> to simply pick up the correct version! | ||
### Node.js — package manager | ||
We use [`pnpm`](https://pnpm.io) as Node.js package manager. | ||
You can see which version of yarn we use by checking the `packageManager` field in the root `package.json`. | ||
### Pre-flight checks | ||
To check that everything is working properly, run: | ||
```sh | ||
turbo run check-all | ||
cargo build | ||
``` | ||
## Tuono development | ||
|
||
1. Start tuono frontend build using | ||
|
||
```sh | ||
turbo run dev | ||
``` | ||
|
||
2. In another terminal run | ||
|
||
```sh | ||
cargo build | ||
``` | ||
|
||
To automatically rebuild crates on code change, consider using `cargo-watch` crate | ||
|
||
```sh | ||
cargo watch -x build -w crates/ | ||
``` | ||
|
||
3. You can now use the binary inside `/target/debug/tuono` in another folder on your local machine | ||
|
||
> Consider adding an alias to your shell setup file | ||
> | ||
> ```sh | ||
> alias t="/path-to-repo/target/debug/tuono" | ||
> ``` | ||
## Documentation development | ||
1. Change the current working directory to the documentation folder: | ||
```sh | ||
cd apps/documentation | ||
``` | ||
2. Run | ||
|
||
```sh | ||
tuono dev | ||
``` | ||
|
||
3. Open the localhost URL. | ||
|
||
> On the documentation remember that `tuono` `npm` package is installed from the registry and | ||
> it is not linked to the repository. |