From 7b7ccc01986a4defaa05b67c78cd089aeeea1475 Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Tue, 19 Mar 2024 02:59:18 +0200 Subject: [PATCH] 0.0.1 --- README.md | 31 ------------------------------- Source/Function/Document.ts | 28 ++++++++++++++++++++-------- Source/Variable/Load.ts | 7 ++----- Target/Function/Document.js | 2 +- Target/Variable/Load.js | 2 +- package.json | 1 - 6 files changed, 24 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index bbd2cf6..7a1c49d 100644 --- a/README.md +++ b/README.md @@ -22,36 +22,5 @@ npm install -D -E typescript-document } ``` -### ESBuild Configuration - -Or with a custom ESBuild config file: - -`package.json` - -```json -{ - "scripts": { - "prepublishOnly": "TypeScriptDocument 'Source/**/*.ts' -es ESBuild.ts" - } -} -``` - -See an example of a configuration file in -[ESBuild.ts](Source/Variable/ESBuild.ts) - -### TypeScript Configuration - -`tsconfig.json` - -```json -{ - "compilerOptions": { - "outDir": "Target" - }, - "extends": "typescript-document/Target/Notation/TypeScript", - "include": ["Source"] -} -``` - [typedoc]: https://npmjs.org/typedoc [TypeScriptDocument]: https://npmjs.org/typescript-document diff --git a/Source/Function/Document.ts b/Source/Function/Document.ts index 4e6637f..eedd2f9 100644 --- a/Source/Function/Document.ts +++ b/Source/Function/Document.ts @@ -15,21 +15,33 @@ export default (async (...[File]: Parameters) => { console.log(Pipe); - Exec( + console.log( [ "typedoc", "--commentStyle all", - "--gitRevision main", + // "--gitRevision Current", `--customCss ${resolve(`${Current}/../Stylesheet/Theme.css`)}`, "--includeVersion", "--out ./Documentation", `--plugin ${resolve(`${Current}/../../Target/Variable/Load.js`)}`, - "--plugin typedoc-plugin-remove-references", - "--plugin typedoc-plugin-rename-defaults", - "--plugin typedoc-plugin-mdn-links", - "--plugin typedoc-plugin-zod", - "--plugin typedoc-plugin-merge-modules", - "--plugin typedoc-plugin-keywords", + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-remove-references/dist/index.js`, + )}`, + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-rename-defaults/index.js`, + )}`, + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-mdn-links/dist/index.js`, + )}`, + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-zod/dist/plugin.js`, + )}`, + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-merge-modules/dist/index.js`, + )}`, + `--plugin ${resolve( + `${Current}/../../node_modules/typedoc-plugin-keywords/index.js`, + )}`, "--searchInComments", `--keywords ${ ( diff --git a/Source/Variable/Load.ts b/Source/Variable/Load.ts index 6bd0bc1..d37addb 100644 --- a/Source/Variable/Load.ts +++ b/Source/Variable/Load.ts @@ -2,11 +2,8 @@ * @module Load * */ -export const load = ((...[Application]: Parameters) => - Application.renderer.defineTheme( - "TypeScriptDocument", - Theme, - )) satisfies Type["load"] as Type["load"]; +export const load = (...[Application]: Parameters) => + Application.renderer.defineTheme("TypeScriptDocument", Theme); export default { load, diff --git a/Target/Function/Document.js b/Target/Function/Document.js index ca2df6c..0017448 100644 --- a/Target/Function/Document.js +++ b/Target/Function/Document.js @@ -1 +1 @@ -var a=async(...[r])=>{for(const e of r)for(const n of await(await import("fast-glob")).default(e.replaceAll("'","").replaceAll('"',"")))t.push(n);t.reverse(),console.log(t),p(["typedoc","--commentStyle all","--gitRevision main",`--customCss ${o(`${i}/../Stylesheet/Theme.css`)}`,"--includeVersion","--out ./Documentation",`--plugin ${o(`${i}/../../Target/Variable/Load.js`)}`,"--plugin typedoc-plugin-remove-references","--plugin typedoc-plugin-rename-defaults","--plugin typedoc-plugin-mdn-links","--plugin typedoc-plugin-zod","--plugin typedoc-plugin-merge-modules","--plugin typedoc-plugin-keywords","--searchInComments",`--keywords ${(await(await import("../Function/JSON.js")).default("package.json",process.cwd()))?.keywords?.join(" --keywords ")??" typescript-document "}`,"--theme TypeScriptDocument","--entryPointStrategy expand","--mergeModulesRenameDefaults","--mergeModulesMergeMode module",`--entryPoints ${t.map(e=>[e.replace("Source/","").split(".").slice(0,-1).join("."),e]).join(" --entryPoints ")}`].join(" "))};const{default:p}=await import("../Function/Exec.js"),{resolve:o}=await import("path"),t=[],i=(await import("url")).fileURLToPath((await import("path")).dirname(import.meta.url));export{i as Current,p as Exec,t as Pipe,a as default,o as resolve}; +var l=async(...[s])=>{for(const t of s)for(const i of await(await import("fast-glob")).default(t.replaceAll("'","").replaceAll('"',"")))n.push(i);n.reverse(),console.log(n),console.log(["typedoc","--commentStyle all",`--customCss ${e(`${o}/../Stylesheet/Theme.css`)}`,"--includeVersion","--out ./Documentation",`--plugin ${e(`${o}/../../Target/Variable/Load.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-remove-references/dist/index.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-rename-defaults/index.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-mdn-links/dist/index.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-zod/dist/plugin.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-merge-modules/dist/index.js`)}`,`--plugin ${e(`${o}/../../node_modules/typedoc-plugin-keywords/index.js`)}`,"--searchInComments",`--keywords ${(await(await import("../Function/JSON.js")).default("package.json",process.cwd()))?.keywords?.join(" --keywords ")??" typescript-document "}`,"--theme TypeScriptDocument","--entryPointStrategy expand","--mergeModulesRenameDefaults","--mergeModulesMergeMode module",`--entryPoints ${n.map(t=>[t.replace("Source/","").split(".").slice(0,-1).join("."),t]).join(" --entryPoints ")}`].join(" "))};const{default:r}=await import("../Function/Exec.js"),{resolve:e}=await import("path"),n=[],o=(await import("url")).fileURLToPath((await import("path")).dirname(import.meta.url));export{o as Current,r as Exec,n as Pipe,l as default,e as resolve}; diff --git a/Target/Variable/Load.js b/Target/Variable/Load.js index 6453797..d403dbf 100644 --- a/Target/Variable/Load.js +++ b/Target/Variable/Load.js @@ -1 +1 @@ -const t=(...[e])=>e.renderer.defineTheme("TypeScriptDocument",a);var o={load:t};const{default:a}=await import("../Class/Theme.js");export{a as Theme,o as default,t as load}; +const t=(...[e])=>e.renderer.defineTheme("TypeScriptDocument",r);var a={load:t};const{default:r}=await import("../Class/Theme.js");export{r as Theme,a as default,t as load}; diff --git a/package.json b/package.json index 2e237c8..0fde1c0 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "prepublishOnly": "TypeScriptESBuild 'Source/**/*.ts'" }, "dependencies": { - "@types/node": "20.11.28", "commander": "12.0.0", "fast-glob": "3.3.2", "typedoc": "0.25.12",