mirror of
https://gitlab.com/MisterBiggs/brain-quartz.git
synced 2025-08-20 12:24:55 +00:00
.github
content
docs
quartz
cli
components
plugins
emitters
404.tsx
aliases.ts
assets.ts
cname.ts
componentResources.ts
contentIndex.ts
contentPage.tsx
folderPage.tsx
index.ts
static.ts
tagPage.tsx
filters
transformers
index.ts
types.ts
vfile.ts
processors
static
styles
util
bootstrap-cli.mjs
bootstrap-worker.mjs
build.ts
cfg.ts
worker.ts
.gitattributes
.gitignore
.npmrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
Dockerfile
LICENSE.txt
README.md
globals.d.ts
index.d.ts
package-lock.json
package.json
quartz.config.ts
quartz.layout.ts
tsconfig.json
21 lines
721 B
TypeScript
21 lines
721 B
TypeScript
import { FilePath, QUARTZ, joinSegments } from "../../util/path"
|
|
import { QuartzEmitterPlugin } from "../types"
|
|
import fs from "fs"
|
|
import { glob } from "../../util/glob"
|
|
|
|
export const Static: QuartzEmitterPlugin = () => ({
|
|
name: "Static",
|
|
getQuartzComponents() {
|
|
return []
|
|
},
|
|
async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
|
|
const staticPath = joinSegments(QUARTZ, "static")
|
|
const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns)
|
|
await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), {
|
|
recursive: true,
|
|
dereference: true,
|
|
})
|
|
return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[]
|
|
},
|
|
})
|