diff options
Diffstat (limited to 'nuldoc-src')
| -rw-r--r-- | nuldoc-src/command.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nuldoc-src/command.ts b/nuldoc-src/command.ts index 7495427..47b8ee0 100644 --- a/nuldoc-src/command.ts +++ b/nuldoc-src/command.ts @@ -13,6 +13,7 @@ export async function run(config: Config) { const posts = await generatePosts(config); await generateTags(posts, config); await generatePostList(posts, config); + await copyStaticFiles(config); } async function generatePosts(config: Config) { @@ -140,3 +141,12 @@ async function outputTags(tagDocs: [string, Document][], config: Config) { await writeHtmlFile(tagDoc, destFilePath); } } + +async function copyStaticFiles(config: Config) { + const globPattern = joinGlobs([Deno.cwd(), config.locations.staticDir, "*"]); + for await (const entry of expandGlob(globPattern)) { + const src = entry.path; + const dst = src.replace(config.locations.staticDir, config.locations.destDir); + await Deno.copyFile(src, dst); + } +} |
