Jacky Zhao
2023-08-03 558a50916446746768fa43bbdfc8e229d8ec7759
format
2 files modified
14 ■■■■■ changed files
quartz/build.ts 2 ●●● patch | view | raw | blame | history
quartz/glob.ts 12 ●●●●● patch | view | raw | blame | history
quartz/build.ts
@@ -78,7 +78,7 @@
  let toRebuild: Set<FilePath> = new Set()
  let toRemove: Set<FilePath> = 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") {
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<FilePath[]> {
export async function glob(
  pattern: string,
  cwd: string,
  ignorePatterns: string[],
): Promise<FilePath[]> {
  const fps = (
    await globby(pattern, {
      cwd,