From decdbd92b84f11f362208ecb6ee626416549badc Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Fri, 27 Jul 2018 16:22:33 -0700 Subject: [PATCH] Js sys contributing (#574) * guide: js-sys testing page should refer to js-sys not web-sys * guide: Use checklist for adding new js-sys APIs --- guide/src/js-sys/adding-more-apis.md | 25 +++++++++++++------------ guide/src/js-sys/testing.md | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/guide/src/js-sys/adding-more-apis.md b/guide/src/js-sys/adding-more-apis.md index 4c77bd50d..1270165b1 100644 --- a/guide/src/js-sys/adding-more-apis.md +++ b/guide/src/js-sys/adding-more-apis.md @@ -1,26 +1,27 @@ -# Adding more APIs +# Adding Support for More JavaScript Global APIs -We've got a [GitHub issue][issue] tracking the remaining APIs that need to be -added to the `js-sys` crate, and we'd love your help in contributing! The steps +We've got a [GitHub issue][issue] tracking the remaining APIs that still need to +be added to the `js-sys` crate, and we'd love your help adding them! The steps to follow are: -* Comment on the issue saying which thing you are going to make bindings for +* [ ] Comment on the issue saying which thing you are going to make bindings for (so that we don't accidentally duplicate effort). -* Open the [MDN +* [ ] Open the [MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects) for the relevant JS API. -* Open `crates/js-sys/src/lib.rs` in your editor; this is the file where we are - implementing the bindings. +* [ ] Open `crates/js-sys/src/lib.rs` in your editor; this is the file where we + are implementing the bindings. -* Follow the instructions in the top of `crates/js-sys/src/lib.rs` about how to - add new bindings. +* [ ] Follow the instructions in the top of `crates/js-sys/src/lib.rs` about how + to add new bindings. -* Add a test for the new binding to `crates/js-sys/tests/wasm/MyType.rs` +* [ ] Add a test for the new binding to `crates/js-sys/tests/wasm/MyType.rs` -* Run the JS global API bindings tests with `cargo test -p js-sys --target wasm32-unknown-unknown` +* [ ] Run the JS global API bindings tests with `cargo test -p js-sys --target + wasm32-unknown-unknown` -* Send a pull request! +* [ ] Send a pull request! [issue]: https://github.com/rustwasm/wasm-bindgen/issues/275 diff --git a/guide/src/js-sys/testing.md b/guide/src/js-sys/testing.md index 1ff0e6a4b..fed1220f9 100644 --- a/guide/src/js-sys/testing.md +++ b/guide/src/js-sys/testing.md @@ -1,11 +1,11 @@ # Testing You can test the `js-sys` crate by running `cargo test --target -wasm32-unknown-unknown` within the `crates/web-sys` directory in the +wasm32-unknown-unknown` within the `crates/js-sys` directory in the `wasm-bindgen` repository: ```sh -cd wasm-bindgen/crates/web-sys +cd wasm-bindgen/crates/js-sys cargo test --target wasm32-unknown-unknown ```