From cd6d4a46c116e6f3576f447ff517dfe9bba63fb9 Mon Sep 17 00:00:00 2001 From: Mohamed Shams El-Deen Date: Tue, 23 Jun 2026 09:56:08 +0300 Subject: [PATCH] chore(config): copy static assets using pathsToCopy --- scripts/html/doc-kit.config.mjs | 1 + scripts/html/index.mjs | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/scripts/html/doc-kit.config.mjs b/scripts/html/doc-kit.config.mjs index 6e5348be..7f999134 100644 --- a/scripts/html/doc-kit.config.mjs +++ b/scripts/html/doc-kit.config.mjs @@ -88,4 +88,5 @@ export default { }, }, }, + pathsToCopy: ['assets'], }; diff --git a/scripts/html/index.mjs b/scripts/html/index.mjs index acdacb3c..d2ff70c1 100644 --- a/scripts/html/index.mjs +++ b/scripts/html/index.mjs @@ -1,14 +1,7 @@ import { execFile } from 'node:child_process'; -import { readFile, cp } from 'node:fs/promises'; -import { dirname, join } from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { readFile } from 'node:fs/promises'; import { promisify } from 'node:util'; -const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', '..'); - -const ASSETS_SOURCE = join(ROOT, 'assets'); -const ASSETS_DESTINATION = join(ROOT, 'out/assets'); - const execFileAsync = promisify(execFile); const runDocKit = version => @@ -44,7 +37,3 @@ for (const version of versions) { await runDocKit(version); } await runDocKit(); - -// copy assets folder to the out directory - -await cp(ASSETS_SOURCE, ASSETS_DESTINATION, { recursive: true });