mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 00:34:37 +00:00
chore(deps): replace chalk
and rimraf
with builtin functions (#1879)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -4,7 +4,7 @@ import { ProcessedContent } from "../plugins/vfile"
|
||||
import { QuartzLogger } from "../util/log"
|
||||
import { trace } from "../util/trace"
|
||||
import { BuildCtx } from "../util/ctx"
|
||||
import chalk from "chalk"
|
||||
import { styleText } from "util"
|
||||
|
||||
export async function emitContent(ctx: BuildCtx, content: ProcessedContent[]) {
|
||||
const { argv, cfg } = ctx
|
||||
@ -26,7 +26,7 @@ export async function emitContent(ctx: BuildCtx, content: ProcessedContent[]) {
|
||||
if (ctx.argv.verbose) {
|
||||
console.log(`[emit:${emitter.name}] ${file}`)
|
||||
} else {
|
||||
log.updateText(`${emitter.name} -> ${chalk.gray(file)}`)
|
||||
log.updateText(`${emitter.name} -> ${styleText("gray", file)}`)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -36,7 +36,7 @@ export async function emitContent(ctx: BuildCtx, content: ProcessedContent[]) {
|
||||
if (ctx.argv.verbose) {
|
||||
console.log(`[emit:${emitter.name}] ${file}`)
|
||||
} else {
|
||||
log.updateText(`${emitter.name} -> ${chalk.gray(file)}`)
|
||||
log.updateText(`${emitter.name} -> ${styleText("gray", file)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import workerpool, { Promise as WorkerPromise } from "workerpool"
|
||||
import { QuartzLogger } from "../util/log"
|
||||
import { trace } from "../util/trace"
|
||||
import { BuildCtx, WorkerSerializableBuildCtx } from "../util/ctx"
|
||||
import chalk from "chalk"
|
||||
import { styleText } from "util"
|
||||
|
||||
export type QuartzMdProcessor = Processor<MDRoot, MDRoot, MDRoot>
|
||||
export type QuartzHtmlProcessor = Processor<undefined, MDRoot, HTMLRoot>
|
||||
@ -194,7 +194,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
|
||||
textToMarkdownPromises.map(async (promise) => {
|
||||
const result = await promise
|
||||
processedFiles += result.length
|
||||
log.updateText(`text->markdown ${chalk.gray(`${processedFiles}/${fps.length}`)}`)
|
||||
log.updateText(`text->markdown ${styleText("gray", `${processedFiles}/${fps.length}`)}`)
|
||||
return result
|
||||
}),
|
||||
).catch(errorHandler)
|
||||
@ -208,7 +208,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
|
||||
markdownToHtmlPromises.map(async (promise) => {
|
||||
const result = await promise
|
||||
processedFiles += result.length
|
||||
log.updateText(`markdown->html ${chalk.gray(`${processedFiles}/${fps.length}`)}`)
|
||||
log.updateText(`markdown->html ${styleText("gray", `${processedFiles}/${fps.length}`)}`)
|
||||
return result
|
||||
}),
|
||||
).catch(errorHandler)
|
||||
|
Reference in New Issue
Block a user