Path: blob/main/package/src/common/create-deno-config.ts
6450 views
import { expandGlobSync } from "../../../src/deno_ral/fs.ts";12const json = JSON.parse(3Deno.readTextFileSync("package/src/common/deno-meta.json"),4//deno-lint-ignore no-explicit-any5) as any;6const meta = json.meta;78delete json.meta;910let excludes: string[] = [];11for (const file of meta.excludeGlobs) {12const f: string = file;13if (f.includes("*")) {14for (const { path } of expandGlobSync(f)) {15excludes.push(path);16}17} else {18excludes.push(f);19}20}2122// drop the current working directory from the paths23excludes = excludes.map((e) => e.replace(Deno.cwd() + "/", ""));2425json.lint.exclude = excludes;26json.fmt.exclude = excludes;2728console.log("// auto-generated by package/src/common/create-deno-config.ts");29console.log("// see dev-docs/update-deno_jsonc.md");30console.log(JSON.stringify(json, null, 2));313233