The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

windows patches

+6 -5
+6 -5
quartz/build.ts
··· 10 10 import { filterContent } from "./processors/filter" 11 11 import { emitContent } from "./processors/emit" 12 12 import cfg from "../quartz.config" 13 - import { FilePath, slugifyFilePath } from "./path" 13 + import { FilePath, joinSegments, slugifyFilePath } from "./path" 14 14 import chokidar from "chokidar" 15 15 import { ProcessedContent } from "./plugins/vfile" 16 16 import WebSocket, { WebSocketServer } from "ws" ··· 42 42 console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`) 43 43 44 44 perf.addEvent("glob") 45 - const fps = await globby("**/*.md", { 45 + const fps = (await globby("**/*.md", { 46 46 cwd: argv.directory, 47 47 ignore: cfg.configuration.ignorePatterns, 48 48 gitignore: true, 49 - }) 49 + })).map(fp => fp.split(path.sep).join(path.posix.sep)) 50 50 console.log( 51 51 `Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`, 52 52 ) 53 53 54 - const filePaths = fps.map((fp) => `${argv.directory}${path.sep}${fp}` as FilePath) 54 + const filePaths = fps.map((fp) => joinSegments(argv.directory, fp) as FilePath) 55 55 ctx.allSlugs = fps.map((fp) => slugifyFilePath(fp as FilePath)) 56 56 57 57 const parsedFiles = await parseMarkdown(ctx, filePaths) ··· 81 81 let toRebuild: Set<FilePath> = new Set() 82 82 let toRemove: Set<FilePath> = new Set() 83 83 async function rebuild(fp: string, action: "add" | "change" | "delete") { 84 + fp = fp.split(path.sep).join(path.posix.sep) 84 85 if (!ignored(fp)) { 85 - const filePath = `${argv.directory}${path.sep}${fp}` as FilePath 86 + const filePath = joinSegments(argv.directory, fp) as FilePath 86 87 if (action === "add" || action === "change") { 87 88 toRebuild.add(filePath) 88 89 } else if (action === "delete") {