mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
fa3f8cf67b
Original: 1abdc2efc0
27 lines
617 B
TypeScript
Executable file
27 lines
617 B
TypeScript
Executable file
#!/usr/bin/env deno --allow-run --allow-write --allow-read
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
import { exit, args } from "deno";
|
|
import { parse } from "./flags/mod.ts";
|
|
import { xrun, executableSuffix } from "./prettier/util.ts";
|
|
|
|
async function main(opts) {
|
|
const args = [
|
|
`deno${executableSuffix}`,
|
|
"--allow-write",
|
|
"--allow-run",
|
|
"--allow-read",
|
|
"prettier/main.ts",
|
|
"--ignore",
|
|
"testdata",
|
|
"--ignore",
|
|
"vendor"
|
|
];
|
|
|
|
if (opts.check) {
|
|
args.push("--check");
|
|
}
|
|
|
|
exit((await xrun({ args }).status()).code);
|
|
}
|
|
|
|
main(parse(args));
|