From 1e595649df252eadee2d30ed817448ebf4731e2f Mon Sep 17 00:00:00 2001 From: Michiel De Backker Date: Thu, 16 Nov 2023 23:07:27 +0100 Subject: [PATCH 1/4] chore: Setup Bikeshed --- .github/workflows/publish.yml | 21 +++++++++++++++++++++ .gitignore | 1 + .pr-preview.json | 8 ++++++++ index.bs | 17 +++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .gitignore create mode 100644 .pr-preview.json create mode 100644 index.bs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..57ecbe6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Build +on: + pull_request: {} + push: + branches: + - main +permissions: + contents: write +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + SOURCE: index.bs + DESTINATION: index.html + GH_PAGES_BRANCH: gh-pages + BUILD_FAIL_ON: warning \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64233a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +index.html \ No newline at end of file diff --git a/.pr-preview.json b/.pr-preview.json new file mode 100644 index 0000000..e3e7155 --- /dev/null +++ b/.pr-preview.json @@ -0,0 +1,8 @@ +{ + "src_file": "index.bs", + "type": "bikeshed", + "params": { + "force": 1 + } +} + diff --git a/index.bs b/index.bs new file mode 100644 index 0000000..6fdbef6 --- /dev/null +++ b/index.bs @@ -0,0 +1,17 @@ +
+Title: Local Peer-to-Peer API
+Shortname: local-peer-to-peer
+Level: 1
+Status: CG-DRAFT
+Group: WICG
+Repository: WICG/local-peer-to-peer
+URL: http://example.com/url-this-spec-will-live-at
+Editor: Belem Zhang, Intel https://intel.com, belem.zhang@intel.com
+!Tests: web-platform-tests local-peer-to-peer/ (ongoing work)
+Abstract: A short description of your spec, one or two sentences.
+
+ +Introduction {#intro} +===================== + +See https://github.com/tabatkins/bikeshed to get started. From 9d6621ae1aeb41db67665e9c3bee915b26352c29 Mon Sep 17 00:00:00 2001 From: Michiel De Backker Date: Fri, 17 Nov 2023 07:42:20 +0100 Subject: [PATCH 2/4] Moved authors to specification --- README.md | 5 ----- index.bs | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f4264b0..037e2bd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,3 @@ -# Authors -- Anssi Kostiainen (Intel) -- Belem Zhang (Intel) -- Wei Wang (Intel) - # Local Peer-to-Peer API For the latest proposals, see the [Local Peer-to-Peer API Explainer](EXPLAINER.md). diff --git a/index.bs b/index.bs index 6fdbef6..b5f2dec 100644 --- a/index.bs +++ b/index.bs @@ -6,7 +6,10 @@ Status: CG-DRAFT Group: WICG Repository: WICG/local-peer-to-peer URL: http://example.com/url-this-spec-will-live-at +Editor: Anssi Kostiainen, Intel https://intel.com, anssi.kostiainen@intel.com Editor: Belem Zhang, Intel https://intel.com, belem.zhang@intel.com +Editor: Michiel De Backker, Twintag https://twintag.com, mail@backkem.me +Editor: Wei Wang, Intel https://intel.com, wei4.wang@intel.com !Tests: web-platform-tests local-peer-to-peer/ (ongoing work) Abstract: A short description of your spec, one or two sentences. From 1e36b6eee9f4dccd7775e0a0ef48662986bbd5d5 Mon Sep 17 00:00:00 2001 From: Michiel De Backker Date: Fri, 17 Nov 2023 07:42:36 +0100 Subject: [PATCH 3/4] Add appetizer to the readme --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 037e2bd..6fe4f39 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,24 @@ # Local Peer-to-Peer API -For the latest proposals, see the [Local Peer-to-Peer API Explainer](EXPLAINER.md). +[Local Peer-to-Peer](https://WICG.github.io/local-peer-to-peer/) is a Web platform API proposal for local communication between browsers without the aid of a server. + +```js +let session = await navigator.lp2p.findPeers(); + +await peer.send("Hello there!"); +``` + +For a more in-dept overview of the proposal, please see the [Explainer](EXPLAINER.md). + +## Status + +This specification is a work in progress. + +## Links + +- [Explainer](EXPLAINER.md) +- [Specification](https://WICG.github.io/local-peer-to-peer/) ## Feedback -We welcome feedback via this GitHub repo issues. Contributions and suggestions to the [Explainer](EXPLAINER.md) are welcome via pull requests too. +We welcome feedback [issue tracker](https://github.com/WICG/local-peer-to-peer/issues) of this GitHub repo. [Contributions](CONTRIBUTING.md) are welcome via pull requests too. From 501a38ad1d15c5fe382c231a72f4fba9e5c6b5c7 Mon Sep 17 00:00:00 2001 From: Michiel De Backker Date: Fri, 17 Nov 2023 08:22:01 +0100 Subject: [PATCH 4/4] update spec header --- README.md | 7 ++++--- index.bs | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6fe4f39..448f508 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ [Local Peer-to-Peer](https://WICG.github.io/local-peer-to-peer/) is a Web platform API proposal for local communication between browsers without the aid of a server. ```js -let session = await navigator.lp2p.findPeers(); - +let peers = await navigator.lp2p.findPeers(); +let peer = peers[0]; +await peer.connect(); await peer.send("Hello there!"); ``` @@ -21,4 +22,4 @@ This specification is a work in progress. ## Feedback -We welcome feedback [issue tracker](https://github.com/WICG/local-peer-to-peer/issues) of this GitHub repo. [Contributions](CONTRIBUTING.md) are welcome via pull requests too. +We welcome feedback via the [issue tracker](https://github.com/WICG/local-peer-to-peer/issues) of this GitHub repo. [Contributions](CONTRIBUTING.md) are welcome via pull requests too. diff --git a/index.bs b/index.bs index b5f2dec..db12a7d 100644 --- a/index.bs +++ b/index.bs @@ -5,16 +5,16 @@ Level: 1 Status: CG-DRAFT Group: WICG Repository: WICG/local-peer-to-peer -URL: http://example.com/url-this-spec-will-live-at +URL: https://WICG.github.io/local-peer-to-peer/ Editor: Anssi Kostiainen, Intel https://intel.com, anssi.kostiainen@intel.com Editor: Belem Zhang, Intel https://intel.com, belem.zhang@intel.com Editor: Michiel De Backker, Twintag https://twintag.com, mail@backkem.me Editor: Wei Wang, Intel https://intel.com, wei4.wang@intel.com !Tests: web-platform-tests local-peer-to-peer/ (ongoing work) -Abstract: A short description of your spec, one or two sentences. +Abstract: Local Peer-to-Peer is a Web platform API proposal for local communication between browsers without the aid of a server. Introduction {#intro} ===================== -See https://github.com/tabatkins/bikeshed to get started. +*This section is non-normative.* \ No newline at end of file