1
0
Fork 0
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:
Bartek Iwańczuk 2020-11-09 20:56:43 +01:00 committed by GitHub
parent b402b75c1d
commit 6f48c526c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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*",

View file

@ -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) {