From 94e0088c01d3b674b2fca4c7006ad0b8d4d92268 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 688f735d..07b51fb1 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 dcfa61b3..7a711600 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,