You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update CONTRIBUTING.md
* Add a .prettierrc.toml for docs
* Prettier + typo
* Your first app
* Update
* Your first app
* Completed your-first-app.md
* Adding state
* Finished adding-state.md
* Finish todo app tutorial
* wip
* View docs
* Add a bunch of other docs
* Add some stubs for new doc pages
* Add some more stubs
* Fix embarassing typo
* Update links in FAQ
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+10-29
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
First, thank you for wanting to contribute! Sycamore is completely free and open-source and could not be so without the help of contributors like you!
4
4
5
-
Check out our community's [Code of Conduct](https://github.com/sycamore-rs/sycamore/blob/main/CODE_OF_CONDUCT.md) and feel free to say hello on our [Discord server](https://discord.gg/vDwFUmm6mU) if you like. We have a special channel dedicated to Sycamore development where you can ask questions and guidance as well as geting to know other users and contributors of Sycamore in an informal setting.
5
+
Check out our community's [Code of Conduct](https://github.com/sycamore-rs/sycamore/blob/main/CODE_OF_CONDUCT.md) and feel free to say hello on our [Discord server](https://discord.gg/vDwFUmm6mU) if you like. We have a special channel dedicated to Sycamore development where you can ask questions and guidance as well as getting to know other users and contributors of Sycamore in an informal setting.
6
6
7
7
The rest of this document will contain:
8
8
@@ -31,8 +31,7 @@ This section will give a brief tour of Sycamore's project structure and where to
31
31
- Integration tests are in `packages/sycamore/tests`.
32
32
- Benchmarks are in `packages/tools/bench`.
33
33
- Examples are in `examples/`.
34
-
- The Sycamore website is in `website/`. This will eventually be moved out into a new repository.
35
-
- The documentation is in `docs/`. This also contains a tool for pre-rendering the markdown files into HTML. This will likely be moved into the new website repository when its ready.
34
+
- The Sycamore website is developed at [sycamore-rs/website](https://github.com/sycamore-rs/website). Every time `docs/` is modified, a workflow is triggered that will automatically update the website with the latest docs.
36
35
37
36
### Crates
38
37
@@ -42,16 +41,10 @@ This is the main crate which is intended to be added to the `Cargo.toml` of a Sy
42
41
43
42
For now, this crate also includes:
44
43
45
-
- The Builder API. We cannot move this out yet because of inter-dependence with other features.
46
-
- Some web-related utilities such as `NoSsr` and `NoHydrate` as well as all the HTML element declarations.
47
-
- Easing functions. This should be moved into another crate.
48
-
- Flow-control components: `Keyed` and `Indexed`. This is because the proc-macros rely on the `sycamore` crate being at the root.
49
-
-`create_resource`. This should probably be moved into the `sycamore-futures` crate.
50
-
- Utilities for tweened signals. This should be moved into another crate along with the easing functions.
51
-
- Suspense. This is for the same reason as the flow-control components.
52
-
- Some utilities used by the codegen of various proc-macros.
44
+
- Easing functions for animations.
45
+
- Utilities for using the `renderAnimationFrame` API.
53
46
54
-
The goal is to eventually move most of these into their own crates.
47
+
These will eventually be moved into a different crate.
55
48
56
49
#### `sycamore-macro`
57
50
@@ -67,23 +60,19 @@ The API is mostly inspired by [SolidJS](https://www.solidjs.com/). Behind-the-sc
67
60
68
61
Everything created inside the reactivity system is owned by the top-level `Root` struct. This includes the node arena as well as global state used for tracking dependencies in memos/effects. Finally, the `Root` is also responsible for propagating updates through the reactive graph.
69
62
70
-
[This article](https://dev.to/ryansolid/a-hands-on-introduction-to-fine-grained-reactivity-3ndf) provides a good introduction to how reactivity is implemented (albeit in JS). The reactive propagation algorithm takes inspiration from [this article](https://dev.to/modderme123/super-charging-fine-grained-reactive-performance-47ph), modified because our reactive system is eager rather than lazy for better predictibility.
63
+
[This article](https://dev.to/ryansolid/a-hands-on-introduction-to-fine-grained-reactivity-3ndf) provides a good introduction to how reactivity is implemented (albeit in JS). The reactive propagation algorithm takes inspiration from [this article](https://dev.to/modderme123/super-charging-fine-grained-reactive-performance-47ph), modified because our reactive system is eager rather than lazy for better predictability.
71
64
72
65
#### `sycamore-core`
73
66
74
67
This crate contains all the core utilities for Sycamore's rendering logic. This includes:
75
68
76
69
- Runtime support for components.
77
-
- Swappable rendering backends.
78
-
- Hydration code. (TODO: this should proabably be moved to `sycamore-web`).
79
-
-`NodeRef`s.
80
-
- Runtime support for rendering dynamic views and difing fragments.
81
70
82
-
This crate is backend-agnostic, meaning that there should be no dependence on `web-sys` or `wasm-bindgen`.
71
+
This crate is backend-agnostic, meaning that there should be no dependence on `web-sys` or `wasm-bindgen`. Right now, a lot of the core rendering logic is in `sycamore-web`. We probably want to move as much as possible over into `sycamore-core` to make it backend-agnostic.
83
72
84
73
#### `sycamore-web`
85
74
86
-
This crate contains all the web specific rendering logic for Sycamore. This includes, notably, `DomNode`, `HydrateNode`, and `SsrNode`.
75
+
This crate contains all the web specific rendering logic for Sycamore. This includes, notably, `DomNode`, `HydrateNode`, and `SsrNode`. This also includes other rendering utilities such as `Keyed`, `Indexed`, `Suspense`, `Transition`, and more... These are all web-specific for now but some should be moved over into `sycamore-core`.
87
76
88
77
#### `sycamore-futures`
89
78
@@ -166,20 +155,12 @@ When adding an example, the following steps should be taken:
166
155
1. Add your example to the `examples/` folder. An easy way to create a new example is the clone an existing example and change the name in the appropriate places (folder name and `Cargo.toml`).
167
156
2. Add your example to the list of examples in `examples/README.md` along with a small description of what your example demonstrates.
168
157
169
-
## Working on the website
170
-
171
-
The website is in the `website/` folder.
172
-
173
-
We use [TailwindCSS](https://tailwindcss.com/) to style the website. First run `npm install` in the `website/` folder to install TailwindCSS. Then simply run `trunk serve` to start the dev server.
174
-
175
158
## Writing docs
176
159
177
-
All the documentation is in the `docs/` folder. As a general rule, you should only ever modify the docs in `docs/next/` and not touch `docs/versioned_docs/`. The documentation in `docs/next/` will be copied over to `docs/versioned_docs/` when there is a new release.
178
-
179
-
When writing the docs, you can use the `docs` utility crate to generate the markdown files into HTML to be displayed on the website. It is recommended to run in release mode since rendering can take some time. To run the utility, simply use `cargo run --release` in the `docs/` folder.
160
+
All the documentation is in the `docs/` folder. This includes the [Sycamore Book](https://sycamore.dev/book/introduction) as well as blog posts.
180
161
181
162
## Running benchmarks
182
163
183
164
We have a very basic benchmark setup in `packages/tools/bench`. Simply run `cargo bench` in that folder to run the micro-benchmarks.
184
165
185
-
We also have an implementaiton for [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark). Runnig this locally, however, is quite a bit more involved. Instead, the simplest way to run this is to add the "performance" label to your PR which will trigger the CI to run the benchmark automatically on every commit and post the result as a comment. Note, however, that the CI can be very noisy and that measurements should be taken with a grain of salt.
166
+
We also have an implementation for [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark). Running this locally, however, is quite a bit more involved. Instead, the simplest way to run this is to add the "performance" label to your PR which will trigger the CI to run the benchmark automatically on every commit and post the result as a comment. Note, however, that the CI can be very noisy and that measurements should be taken with a grain of salt.
0 commit comments