Skip to content

Commit 63a642b

Browse files
committed
Update contributing (#101)
* Update contributing * Add links in README
1 parent de13e06 commit 63a642b

File tree

3 files changed

+68
-3
lines changed

3 files changed

+68
-3
lines changed

CONTRIBUTING.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,68 @@
1-
# Contributing to Recho
1+
# Recho - Contributing
2+
3+
Recho is open source and released under the [ISC license](/LICENCE). You are welcome to contribute in different ways: open a [pull request](https://github.com/recho-dev/recho/pulls), participate in [issues](https://github.com/recho-dev/recho/issues) and [discussions](https://github.com/recho-dev/recho/discussions) or star this project!
24

35
## Sharing Examples
6+
7+
All the examples are located in `app/examples`. The quickest way to add an example is through GitHub's web editor:
8+
9+
- Go to [new file](https://github.com/recho-dev/recho/new/main/app/examples).
10+
- Enter the filename in the format of `[SKETCH-NAME].recho.js`.
11+
- Add the metadata as doc strings at the top of the file.
12+
- Add the code below the metadata.
13+
- Click the "Commit changes" button.
14+
15+
The following metadata are required:
16+
17+
- **title** - the title of the sketch
18+
- **author** - the author of the sketch
19+
- **created** - the date of the creation of the sketch
20+
- **github** - the GitHub username of the author, for displaying the avatar
21+
- **pull_request** - the pull request number of adding this sketch, for commenting on the pull request
22+
23+
The following metadata are optional:
24+
25+
- **thumbnail_start** - the line number of the start of the thumbnail code
26+
27+
Here is an example:
28+
29+
```js
30+
/**
31+
* @title Hello World
32+
* @author Bairui SU
33+
* @github pearmini
34+
* @created 2025-09-15
35+
* @pull_request 123
36+
* @thumbnail_start 26
37+
*/
38+
39+
echo("Hello World");
40+
```
41+
42+
This is a [pull request](https://github.com/recho-dev/recho/pull/82) you can refer to.
43+
44+
## Editor & Runtime Development
45+
46+
If you want to contribute to the editor or runtime, make sure to add test files in `test/js/` and register them in `test/js/index.js`.
47+
48+
For example, if you add a new test file called `hello-world.js` with the following content:
49+
50+
```js
51+
export const helloWorld = `echo("Hello World");`;
52+
```
53+
54+
Then you need to register it in _test/js/index.js_ with the following content:
55+
56+
```js
57+
export {helloWorld} from "./hello-world.js";
58+
```
59+
60+
Then run `npm run dev` to open the development server.
61+
62+
![test-env](/img/test-env.png)
63+
64+
After finishing development, run `npm run test` to make sure everything works as expected.
65+
66+
## Website Development
67+
68+
If you want to contribute to the [website](https://recho.dev/), run `npm run app:dev` to open the development server. After finishing development, run `npm run test` to make sure everything works as expected.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
- [Documentation](https://recho.dev/docs/introduction) 📚 - Learn how to use Recho with our comprehensive guides.
99
- [Examples](https://recho.dev/examples) 🖼️ - See what you can create and draw some inspiration!
1010
- [Sharing](/CONTRIBUTING.md#contributing-to-recho) 🎨 - Follow the instructions to open a [pull request](https://github.com/recho-dev/recho/new/main/app/examples) to share your sketches!
11-
- [Contributing](https://github.com/recho-dev/recho/issues) 🙏 - We have a bunch of things that we would like you to help us build together!
11+
- [Contributing](/CONTRIBUTING.md) 🙏 - We have [a bunch of things](https://github.com/recho-dev/recho/issues) that we would like you to help us build together!
1212

1313
## Why Recho 💡
1414

15-
We want to make code more accessible and hopefully, more playful. Inspired by [P5.js Editor](https://editor.p5js.org/) and [Observable Notebook](https://observablehq.com/), we realize that _well-designed libraries don't necessarily make code accessible—the code environment does_! So here is Recho: **a lighter way to code, creatively**. We offer you a lighter beginning:
15+
We want to make code more accessible and hopefully, more playful. Inspired by [P5.js Editor](https://editor.p5js.org/) and [Observable Notebook](https://observablehq.com/), we realize that _well-designed libraries don't necessarily make code accessible—the code environment does_! So here is Recho: **a lighter way to code**. We offer you a lighter beginning:
1616

1717
- **Lighter Input** - We use vanilla JavaScript, and you don't have to learn extra libraries or browser specific APIs to get started with. It can help you focus more on general coding concepts and algorithms themselves.
1818
- **Lighter Output** - We embrace text-based output—a universal and timeless interface. It's concise, intuitive, and efficient, which keeps your attention on the essence of code rather than the overhead of visuals.

img/test-env.png

81.5 KB
Loading

0 commit comments

Comments
 (0)