build: move docs to dist · h3js/h3@e87ceca

5 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -10,4 +10,3 @@ tsconfig.vitest-temp.json

1010

.DS_Store

1111

tsconfig.tsbuildinfo

1212

*.tmp*

13-

skills/h3/docs

Original file line numberDiff line numberDiff line change

@@ -16,7 +16,7 @@ if (process.argv[2] === "docs") {

1616

} catch {}

1717

}) || ["npm", "x"];

1818

const runnerCmd = [runner[0], runner[1]].filter(Boolean).join(" ");

19-

const docsDir = new URL("../skills/h3/docs", import.meta.url).pathname;

19+

const docsDir = new URL("../dist/docs", import.meta.url).pathname;

2020

const args = process.argv.slice(3).join(" ");

2121

execSync(`${runnerCmd} mdzilla ${docsDir}${args ? ` ${args}` : ""}`, { stdio: "inherit" });

2222

process.exit(0);

Original file line numberDiff line numberDiff line change

@@ -21,9 +21,8 @@ export default defineBuildConfig({

2121

const { DocsManager, DocsSourceFS, exportDocsToFS } = await import("mdzilla");

2222

const man = new DocsManager(new DocsSourceFS("./docs"));

2323

await man.load();

24-

await rmdir("./skills/h3/docs", { recursive: true }).catch(() => {});

25-

await mkdir("./skills/h3/docs", { recursive: true });

26-

await exportDocsToFS(man, "./skills/h3/docs", {

24+

await mkdir("./dist/docs", { recursive: true });

25+

await exportDocsToFS(man, "./dist/docs", {

2726

title: "H3 Documentation",

2827

tocFile: "TOC.md",

2928

filter: (e) => !e.entry.path.startsWith("/blog"),

Original file line numberDiff line numberDiff line change

@@ -10,8 +10,7 @@

1010

},

1111

"files": [

1212

"bin",

13-

"dist",

14-

"skills"

13+

"dist"

1514

],

1615

"type": "module",

1716

"sideEffects": false,