format
This commit is contained in:
parent
cfdb71d00d
commit
9c699a27a9
@ -86,8 +86,8 @@ const BuildArgv = {
|
|||||||
},
|
},
|
||||||
concurrency: {
|
concurrency: {
|
||||||
number: true,
|
number: true,
|
||||||
describe: "how many threads to use to parse notes"
|
describe: "how many threads to use to parse notes",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapePath(fp) {
|
function escapePath(fp) {
|
||||||
|
@ -118,7 +118,8 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
|
|||||||
const log = new QuartzLogger(argv.verbose)
|
const log = new QuartzLogger(argv.verbose)
|
||||||
|
|
||||||
const CHUNK_SIZE = 128
|
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[] = []
|
let res: ProcessedContent[] = []
|
||||||
log.start(`Parsing input files using ${concurrency} threads`)
|
log.start(`Parsing input files using ${concurrency} threads`)
|
||||||
|
@ -16,4 +16,3 @@ export const options: sourceMapSupport.Options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@ export function trace(msg: string, err: Error) {
|
|||||||
lines.push("")
|
lines.push("")
|
||||||
lines.push(
|
lines.push(
|
||||||
"\n" +
|
"\n" +
|
||||||
chalk.bgRed.black.bold(" ERROR ") +
|
chalk.bgRed.black.bold(" ERROR ") +
|
||||||
"\n" +
|
"\n" +
|
||||||
chalk.red(` ${msg}`) +
|
chalk.red(` ${msg}`) +
|
||||||
(err.message.length > 0 ? `: ${err.message}` : ""),
|
(err.message.length > 0 ? `: ${err.message}` : ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!stack) {
|
if (!stack) {
|
||||||
|
Loading…
Reference in New Issue
Block a user