This commit is contained in:
Jacky Zhao 2023-08-08 22:53:01 -07:00
parent b79e889d87
commit 486bd9358c
4 changed files with 8 additions and 8 deletions

View File

@ -86,8 +86,8 @@ const BuildArgv = {
},
concurrency: {
number: true,
describe: "how many threads to use to parse notes"
}
describe: "how many threads to use to parse notes",
},
}
function escapePath(fp) {

View File

@ -118,7 +118,8 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
const log = new QuartzLogger(argv.verbose)
const CHUNK_SIZE = 128
let concurrency = ctx.argv.concurrency ?? (fps.length < CHUNK_SIZE ? 1 : os.availableParallelism())
let concurrency =
ctx.argv.concurrency ?? (fps.length < CHUNK_SIZE ? 1 : os.availableParallelism())
let res: ProcessedContent[] = []
log.start(`Parsing input files using ${concurrency} threads`)

View File

@ -16,4 +16,3 @@ export const options: sourceMapSupport.Options = {
}
},
}

View File

@ -11,10 +11,10 @@ export function trace(msg: string, err: Error) {
lines.push("")
lines.push(
"\n" +
chalk.bgRed.black.bold(" ERROR ") +
"\n" +
chalk.red(` ${msg}`) +
(err.message.length > 0 ? `: ${err.message}` : ""),
chalk.bgRed.black.bold(" ERROR ") +
"\n" +
chalk.red(` ${msg}`) +
(err.message.length > 0 ? `: ${err.message}` : ""),
)
if (!stack) {