Skip to content

Commit 0a02046

Browse files
Improved contributing docs in web-sys README (#4302)
1 parent 89f2af8 commit 0a02046

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

crates/web-sys/README.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Raw bindings to Web APIs for projects using `wasm-bindgen`.
44

5-
* [The `web-sys` section of the `wasm-bindgen`
5+
- [The `web-sys` section of the `wasm-bindgen`
66
guide](https://rustwasm.github.io/wasm-bindgen/web-sys/index.html)
7-
* [API Documentation](https://rustwasm.github.io/wasm-bindgen/api/web_sys/)
7+
- [API Documentation](https://rustwasm.github.io/wasm-bindgen/api/web_sys/)
88

99
## Crate features
1010

@@ -30,19 +30,23 @@ If you don't see a particular web API in `web-sys`, here is how to add it.
3030
[very bottom](https://w3c.github.io/mediasession/#idl-index) of _that_ page
3131
is the IDL.
3232
2. Annotate the functions that can throw with `[Throws]`
33-
3. Run `cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml`
34-
4. Run `git add .` to add all the generated files into git.
35-
5. Add an entry in CHANGELOG.md like the following
33+
3. `cd crates/web-sys`
34+
4. Run `cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml`
35+
36+
If formatting fails, you can run `cargo fmt` in the `crates/web-sys` directory. On Windows, you might also want to run `cargo fmt -- --config newline_style=Unix` depending on your git configuration.
37+
38+
5. Run `git add .` to add all the generated files into git.
39+
6. Add an entry in CHANGELOG.md like the following
40+
3641
```md
3742
...
38-
43+
3944
## Unreleased
40-
45+
4146
### Added
42-
47+
4348
...
44-
49+
4550
* Added <your addition>
46-
[#1234](https://github.com/rustwasm/wasm-bindgen/pull/1234) # <- link to your PR
51+
[#1234](https://github.com/rustwasm/wasm-bindgen/pull/1234) # <- link to your PR
4752
```
48-

0 commit comments

Comments
 (0)