mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 00:59:24 -05:00
chore: reference dprint config file in format script (#8318)
* chore: reference dprint config file in format script * chore: ignore .git folder in dprint config
This commit is contained in:
parent
b402b75c1d
commit
6f48c526c6
2 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
"includes": ["**/*.{ts,tsx,js,jsx,json,md}"],
|
||||
"excludes": [
|
||||
".cargo_home",
|
||||
".git",
|
||||
"cli/dts/lib.d.ts",
|
||||
"cli/dts/lib.dom*",
|
||||
"cli/dts/lib.es*",
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
import { getPrebuiltToolPath, getSources, join, ROOT_PATH } from "./util.js";
|
||||
|
||||
async function dprint() {
|
||||
const configFile = join(ROOT_PATH, ".dprintrc.json");
|
||||
const execPath = getPrebuiltToolPath("dprint");
|
||||
console.log("dprint");
|
||||
const p = Deno.run({
|
||||
cmd: [execPath, "fmt"],
|
||||
cmd: [execPath, "fmt", "--config=" + configFile],
|
||||
});
|
||||
const { success } = await p.status();
|
||||
if (!success) {
|
||||
|
|
Loading…
Reference in a new issue