From 558a50916446746768fa43bbdfc8e229d8ec7759 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 2 Aug 2023 22:11:46 -0700 Subject: [PATCH] format --- quartz/build.ts | 2 +- quartz/glob.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/quartz/build.ts b/quartz/build.ts index 688f735d2..07b51fb17 100644 --- a/quartz/build.ts +++ b/quartz/build.ts @@ -78,7 +78,7 @@ async function startServing(ctx: BuildCtx, initialContent: ProcessedContent[]) { let toRebuild: Set = new Set() let toRemove: Set = new Set() async function rebuild(fp: string, action: "add" | "change" | "delete") { - fp = toPosixPath(fp) + fp = toPosixPath(fp) if (!ignored(fp)) { const filePath = joinSegments(argv.directory, fp) as FilePath if (action === "add" || action === "change") { diff --git a/quartz/glob.ts b/quartz/glob.ts index dcfa61b32..7a7116007 100644 --- a/quartz/glob.ts +++ b/quartz/glob.ts @@ -1,12 +1,16 @@ -import path from "path"; -import { FilePath } from "./path"; -import { globby } from "globby"; +import path from "path" +import { FilePath } from "./path" +import { globby } from "globby" export function toPosixPath(fp: string): string { return fp.split(path.sep).join("/") } -export async function glob(pattern: string, cwd: string, ignorePatterns: string[]): Promise { +export async function glob( + pattern: string, + cwd: string, + ignorePatterns: string[], +): Promise { const fps = ( await globby(pattern, { cwd,