refactor static and asset emission to be actual emitter plugins

This commit is contained in:
Jacky Zhao 2023-07-23 17:07:19 -07:00
parent 000eb4c3c0
commit 9e83af04a7
18 changed files with 197 additions and 173 deletions
quartz/plugins

View file

@ -4,6 +4,7 @@ import { ProcessedContent } from "./vfile"
import { GlobalConfiguration } from "../cfg"
import { QuartzComponent } from "../components/types"
import { FilePath, ServerSlug } from "../path"
import { BuildCtx } from "../ctx"
export interface PluginTypes {
transformers: QuartzTransformerPluginInstance[]
@ -37,8 +38,7 @@ export type QuartzEmitterPlugin<Options extends OptionType = undefined> = (
export type QuartzEmitterPluginInstance = {
name: string
emit(
contentDir: string,
cfg: GlobalConfiguration,
ctx: BuildCtx,
content: ProcessedContent[],
resources: StaticResources,
emitCallback: EmitCallback,