1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-27 16:10:57 -05:00

Add format script.

Original: 85ff88b0cc
This commit is contained in:
Ryan Dahl 2018-12-18 18:56:12 -05:00
parent 968d508425
commit e249378fdf
2 changed files with 13 additions and 1 deletions

13
format.ts Executable file
View file

@ -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();

View file

@ -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<number> {
while (this.r === this.w) {