From 050af55f92782c027f7522ceb8446049e5bbff04 Mon Sep 17 00:00:00 2001 From: babiabeo Date: Tue, 5 Mar 2024 16:41:25 +0700 Subject: [PATCH] docs: fix README file was not published --- README.md | 19 +++++++++++-------- deno.json | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 572b2fb..d4e8aa3 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,21 @@ [![Built with the Deno Standard Library](https://raw.githubusercontent.com/denoland/deno_std/main/badge.svg)](https://deno.land/std) -**_Deko_** is a simple WebSocket client for Deno. +**_Deko_** is a simple WebSocket client for Deno. > [!WARNING] -> If you want to connect WebSocket on browsers, use [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) instead. +> If you want to connect WebSocket on browsers, use +> [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) +> instead. ## Features - [x] Easy to use. - [x] Supports custom headers. -- [x] Passes the [Autobahn testsuite](https://github.com/crossbario/autobahn-testsuite). [^report] -- [x] Follows [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455) WebSocket implementation. +- [x] Passes the + [Autobahn testsuite](https://github.com/crossbario/autobahn-testsuite). [^report] +- [x] Follows [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455) + WebSocket implementation. ## Usage @@ -47,12 +51,11 @@ const client = new Deko({ uri: "websocket url goes here" }); client.onOpen = () => { console.log("Connected to WebSocket server!"); -} +}; await client.connect(); ``` - #### Receives a text message from WebSocket server ```ts @@ -64,7 +67,7 @@ client.onMessage = (_, message) => { if (message.opcode === OpCode.TextFrame) { console.log(new TextDecoder().decode(message.payload)); } -} +}; await client.connect(); ``` @@ -87,4 +90,4 @@ setTimeout(async () => { This repository/package is under **MIT License**. See [LICENSE](./LICENSE). -[^report]: https://babiabeo.github.io/autobahn/deko/ \ No newline at end of file +[^report]: https://babiabeo.github.io/autobahn/deko/ diff --git a/deno.json b/deno.json index d75e2e3..20726fb 100644 --- a/deno.json +++ b/deno.json @@ -1,13 +1,13 @@ { "name": "@babia/deko", - "version": "0.1.0", + "version": "0.1.1", "imports": { "@std/bytes": "jsr:@std/bytes@^0.218.2", "@std/encoding": "jsr:@std/encoding@^0.218.2", "@std/io": "jsr:@std/io@^0.218.2" }, "exports": "./mod.ts", - "exclude": [".vscode", "autobahn", "README.md", "LICENSE", "docs"], + "exclude": [".vscode", "autobahn", "docs"], "tasks": { "autobahn": "deno run --allow-net test/autobahn.ts", "lint": "deno fmt --check && deno lint",