Skip to main content
Module

x/pagic/mod.ts>default

A static site generator powered by Deno + React
Go to Latest
class default
extends EventEmitter<{ buildFinish: []; }>
import { default } from "https://deno.land/x/pagic@v1.5.1/mod.ts";

Constructors

new
default(config?: Partial<PagicConfig>)

Properties

private
changedPaths: string[]
private
runtimeConfig: Partial<PagicConfig>
private
timeoutHandler: number | undefined
config: PagicConfig
layoutPaths: string[]
pagePaths: string[]

Pages that need to be build

pagePropsMap: Record<string, PageProps>

A map stored all pageProps

pagicConfigPath: string
projectConfig: Partial<PagicConfig>
rebuilding: boolean
staticPaths: string[]
writeFiles: Record<string, string>

Files that need to be write

Methods

private
handleFileChange(filePaths: string[])
private
initConfig()

Deep merge defaultConfig, projectConfig and runtimeConfig, then sort plugins

private
initPaths()
private
rebuild()
private
runPlugins()
private
serve()
private
watch()
getConfig(pagePath?: string)

Static Properties

defaultConfig: PagicConfig
REGEXP_LAYOUT: RegExp
REGEXP_PAGE: RegExp