From 85ff88b0cc076d1a79fd15ddf4475270765bcfda Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 18 Dec 2018 18:56:12 -0500 Subject: [PATCH] Add format script. --- format.ts | 13 +++++++++++++ net/bufio.ts | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 format.ts diff --git a/format.ts b/format.ts new file mode 100755 index 0000000000..251cba1ed5 --- /dev/null +++ b/format.ts @@ -0,0 +1,13 @@ +#!/usr/bin/env deno --allow-run + +import { exit, run } from "deno"; + +async function main() { + const prettier = run({ + args: ["bash", "-c", "prettier --write *.ts **/*.ts"] + }); + const s = await prettier.status(); + exit(s.code); +} + +main(); diff --git a/net/bufio.ts b/net/bufio.ts index b412cbce83..0dd2b94b42 100644 --- a/net/bufio.ts +++ b/net/bufio.ts @@ -185,7 +185,6 @@ export class BufReader implements Reader { return [nread, nread < p.length ? "EOF" : null]; } - /** Returns the next byte [0, 255] or -1 if EOF. */ async readByte(): Promise { while (this.r === this.w) {