Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 26, 2023
1 parent ca0765c commit 72e13ef
Show file tree
Hide file tree
Showing 34 changed files with 739 additions and 359 deletions.
2 changes: 1 addition & 1 deletion Documentation/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Documentation/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/functions/Build.Exec.html

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions Documentation/functions/Build.deepmerge.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions Documentation/index.html

Large diffs are not rendered by default.

63 changes: 41 additions & 22 deletions Documentation/interfaces/Build.Type.html

Large diffs are not rendered by default.

119 changes: 119 additions & 0 deletions Documentation/interfaces/Interface_Exec.Type.html

Large diffs are not rendered by default.

52 changes: 28 additions & 24 deletions Documentation/modules/Build.html

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/modules/Exec.html

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/modules/File.html

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/modules/Function_JSON.html

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions Documentation/modules/Interface_Exec.html

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/modules/Object_ESBuild.html

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions Documentation/modules/TypeScriptESBuild.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Source/Function/Build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* The `Build` function compiles and builds TypeScript files using esbuild and the TypeScript compiler.
*
* @module Build
*
*/
Expand Down Expand Up @@ -29,7 +27,7 @@ export default (async (...[File, Option]: Parameters<Type>) => {
File,
])
),
} satisfies Option
}
);

const Result = await (
Expand Down Expand Up @@ -70,12 +68,14 @@ export default (async (...[File, Option]: Parameters<Type>) => {
)} \
--includeVersion \
--out ./Documentation \
--plugin typedoc-plugin-remove-references \
--plugin typedoc-plugin-rename-defaults \
--plugin typedoc-plugin-mdn-links \
--plugin typedoc-plugin-zod \
--plugin @mxssfd/typedoc-theme \
--plugin typedoc-plugin-merge-modules \
--theme my-theme \
--entryPointStrategy expand \
--entryPointStrategy expand Source/ \
--mergeModulesRenameDefaults \
--mergeModulesMergeMode module \
--entryPoints ${Object.values(Configuration.entryPoints).join(
Expand All @@ -84,7 +84,6 @@ export default (async (...[File, Option]: Parameters<Type>) => {
);
}) satisfies Type as Type;

import type { BuildOptions as Option } from "esbuild";
import type Type from "../Interface/Build.js";

export const { default: Exec } = await import("../Function/Exec.js");
Expand Down
17 changes: 8 additions & 9 deletions Source/Function/Exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
* @param {string} Command - The `Command` parameter is a string that represents the
* command you want to execute. It can be any valid command that can be executed in a
* terminal or command prompt.
*
*/
export default async (
Command: string,
// rome-ignore lint/suspicious/noExplicitAny:
Echo: false | ((Return: any) => void) = (Return) => console.log(Return)
export default (async (
...[Command, Echo = (Return) => console.log(Return)]: Parameters<Type>
) => {
try {
const Exec = (await import("child_process")).exec(Command);

Echo && typeof Echo === "function"
? Exec.stdout?.on("data", (Data) => Echo(Data))
: {};
if (typeof Echo === "function") {
Exec.stdout?.on("data", (Data) => Echo(Data));
}
} catch (_Error) {}
};
}) satisfies Type as Type;

import type Type from "../Interface/Exec.js";
1 change: 0 additions & 1 deletion Source/Function/File.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* you want to process.
*
* @returns the default export of the module that is imported using the provided `Path`.
*
*/
export default async (Path: string) => {
if (Path.split(".").pop() === "ts") {
Expand Down
18 changes: 9 additions & 9 deletions Source/Interface/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
*
*/
export default interface Type {
/**
* Represents a function that processes file patterns.
*
* @param {Pattern[]} File - An array of file patterns to be processed. Each pattern can include wildcards (*) to match multiple files.
* @param {Object} [Option] - An optional object that can contain two properties.
* @param {string} [Option.ESBuild] - A string representing the ESBuild option.
* @param {string} [Option.TypeScript] - A string representing the TypeScript option.
* @returns {Promise<void>} A promise that resolves when the processing is complete.
*/
(
/**
* An array of file patterns to be processed. Each pattern can include
* wildcards (*) to match multiple files.
*
*/
File: Pattern[],

/**
*
*/
Option?: {
ESBuild?: string;
TypeScript?: string;
Expand Down
7 changes: 7 additions & 0 deletions Source/Interface/Exec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default interface Type {
(
Command: string,
// rome-ignore lint/suspicious/noExplicitAny:
Echo?: false | ((Return: any) => void)
): Promise<void>;
}
4 changes: 1 addition & 3 deletions Target/Function/Build.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/**
* The `Build` function compiles and builds TypeScript files using esbuild and the TypeScript compiler.
*
* @module Build
*
*/
declare const _default: Type;
export default _default;
import type Type from "../Interface/Build.js";
export declare const Exec: (Command: string, Echo?: false | ((Return: any) => void)) => Promise<void>;
export declare const Exec: import("../Interface/Exec.js").default;
export declare const deepmerge: typeof import("deepmerge-ts").deepmerge;
2 changes: 1 addition & 1 deletion Target/Function/Build.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Target/Function/Exec.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @param {string} Command - The `Command` parameter is a string that represents the
* command you want to execute. It can be any valid command that can be executed in a
* terminal or command prompt.
*
*/
declare const _default: (Command: string, Echo?: false | ((Return: any) => void)) => Promise<void>;
declare const _default: Type;
export default _default;
import type Type from "../Interface/Exec.js";
2 changes: 1 addition & 1 deletion Target/Function/Exec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var n=async(a,o=t=>console.log(t))=>{try{const t=(await import("child_process")).exec(a);o&&typeof o=="function"&&t.stdout?.on("data",e=>o(e))}catch{}};export{n as default};
var r=async(...[a,t=e=>console.log(e)])=>{try{const e=(await import("child_process")).exec(a);typeof t=="function"&&e.stdout?.on("data",o=>t(o))}catch{}};export{r as default};
1 change: 0 additions & 1 deletion Target/Function/File.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* you want to process.
*
* @returns the default export of the module that is imported using the provided `Path`.
*
*/
declare const _default: (Path: string) => Promise<any>;
export default _default;
14 changes: 7 additions & 7 deletions Target/Interface/Build.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
*
*/
export default interface Type {
(
/**
* An array of file patterns to be processed. Each pattern can include
* wildcards (*) to match multiple files.
*/
File: Pattern[],
/**
* Represents a function that processes file patterns.
*
* @param {Pattern[]} File - An array of file patterns to be processed. Each pattern can include wildcards (*) to match multiple files.
* @param {Object} [Option] - An optional object that can contain two properties.
* @param {string} [Option.ESBuild] - A string representing the ESBuild option.
* @param {string} [Option.TypeScript] - A string representing the TypeScript option.
* @returns {Promise<void>} A promise that resolves when the processing is complete.
*/
Option?: {
(File: Pattern[], Option?: {
ESBuild?: string;
TypeScript?: string;
}): Promise<void>;
Expand Down
3 changes: 3 additions & 0 deletions Target/Interface/Exec.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default interface Type {
(Command: string, Echo?: false | ((Return: any) => void)): Promise<void>;
}
Empty file added Target/Interface/Exec.js
Empty file.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"typedoc": "0.25.1",
"typedoc-plugin-mdn-links": "3.1.0",
"typedoc-plugin-merge-modules": "5.1.0",
"typedoc-plugin-remove-references": "0.0.6",
"typedoc-plugin-rename-defaults": "0.6.6",
"typedoc-plugin-zod": "1.1.0",
"typescript": "5.2.2"
},
Expand Down

0 comments on commit 72e13ef

Please sign in to comment.