Skip to content

Commit

Permalink
Merge pull request #3 from tommardh/master
Browse files Browse the repository at this point in the history
Updated dependencies to support Deno 1.2
  • Loading branch information
ryo-ma authored Aug 15, 2020
2 parents 1cd5616 + af4c173 commit f0acf0a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
10 changes: 10 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export { EventEmitter } from "https://deno.land/[email protected]/node/events.ts";
export { Server, serve } from "https://deno.land/[email protected]/http/server.ts";
export {
acceptWebSocket,
isWebSocketCloseEvent,
isWebSocketPingEvent,
isWebSocketPongEvent,
connectWebSocket,
WebSocket,
} from "https://deno.land/[email protected]/ws/mod.ts";
10 changes: 6 additions & 4 deletions example/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { encode } from "https://deno.land/std/encoding/utf8.ts";
import { BufReader } from "https://deno.land/std/io/bufio.ts";
import { TextProtoReader } from "https://deno.land/std/textproto/mod.ts";
import { blue, green, red, yellow } from "https://deno.land/std/fmt/colors.ts";
import {
encode,
BufReader,
TextProtoReader,
blue, green, red, yellow
} from "./deps.ts";
import { WebSocket } from "../lib/websocket.ts";

const endpoint = Deno.args[0] || "ws://127.0.0.1:8080";
Expand Down
4 changes: 4 additions & 0 deletions example/deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { encode } from "https://deno.land/[email protected]/encoding/utf8.ts";
export { BufReader } from "https://deno.land/[email protected]/io/bufio.ts";
export { TextProtoReader } from "https://deno.land/[email protected]/textproto/mod.ts";
export { blue, green, red, yellow } from "https://deno.land/[email protected]/fmt/colors.ts";
6 changes: 3 additions & 3 deletions lib/websocket.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { EventEmitter } from "https://deno.land/std/node/events.ts";
import { Server, serve } from "https://deno.land/std/http/server.ts";
import { EventEmitter } from "./../deps.ts";
import { Server, serve } from "./../deps.ts";
import {
acceptWebSocket,
isWebSocketCloseEvent,
isWebSocketPingEvent,
isWebSocketPongEvent,
connectWebSocket,
WebSocket as STDWebSocket,
} from "https://deno.land/std/ws/mod.ts";
} from "./../deps.ts";

import { WebSocketError } from "./errors.ts";

Expand Down

0 comments on commit f0acf0a

Please sign in to comment.