mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 06:28:14 +00:00
finish path refactoring, add sourcemap + better trace support
This commit is contained in:
parent
906f91f8ee
commit
3ac6b42e16
36 changed files with 331 additions and 1170 deletions
quartz/processors
|
@ -14,6 +14,7 @@ import workerpool, { Promise as WorkerPromise } from 'workerpool'
|
|||
import { QuartzTransformerPluginInstance } from '../plugins/types'
|
||||
import { QuartzLogger } from '../log'
|
||||
import chalk from 'chalk'
|
||||
import { trace } from '../trace'
|
||||
|
||||
export type QuartzProcessor = Processor<MDRoot, HTMLRoot, void>
|
||||
export function createProcessor(transformers: QuartzTransformerPluginInstance[]): QuartzProcessor {
|
||||
|
@ -101,7 +102,7 @@ export function createFileParser(transformers: QuartzTransformerPluginInstance[]
|
|||
console.log(`[process] ${fp} -> ${file.data.slug}`)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(chalk.red(`\nFailed to process \`${fp}\`: `) + err)
|
||||
trace(`\nFailed to process \`${fp}\``, err as Error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue