Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 20, 2024
1 parent 6319750 commit 3dbbc8f
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 118 deletions.
2 changes: 1 addition & 1 deletion Source/Function/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type Interface from "../Interface/Build.js";
* @module Build
*
*/
export default (async (...[File, Option]: Parameters<Interface>) => {
export default (async (...[File, Option]) => {
for (const _File of File) {
for (const __File of await (
await import("fast-glob")
Expand Down
2 changes: 1 addition & 1 deletion Source/Function/Exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default (async (
...[
Command,
Echo = async (Return) => console.log(Return),
]: Parameters<Interface>
]
) => {
try {
const { stdout, stderr } = (await import("child_process")).exec(
Expand Down
2 changes: 1 addition & 1 deletion Source/Function/File.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type Interface from "../Interface/File.js";
* @module File
*
*/
export default (async (...[Path]: Parameters<Interface>) => {
export default (async (...[Path]) => {
if (Path.split(".").pop() === "ts") {
const { options: Option } = (
await import("typescript")
Expand Down
2 changes: 1 addition & 1 deletion Source/Function/JSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type Interface from "../Interface/JSON.js";
* @module JSON
*
*/
export default (async (...[File, From]: Parameters<Interface>) =>
export default (async (...[File, From]) =>
JSON.parse(
(
await (
Expand Down
36 changes: 12 additions & 24 deletions Target/Function/Build.d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
import type Interface from "../Interface/Build.js";

/**
* @module Build
*
*/
declare const _default: Interface;
export default _default;
export declare const Exec: import("../Interface/Exec.js").default;
export declare const Merge: <Ts extends readonly unknown[]>(
...objects: Ts
) => import("deepmerge-ts").DeepMergeHKT<
Ts,
Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>,
Readonly<{
key: PropertyKey;
parents: ReadonlyArray<Readonly<Record<PropertyKey, unknown>>>;
}>
>;
export declare const Merge: <Ts extends readonly unknown[]>(...objects: Ts) => import("deepmerge-ts").DeepMergeHKT<Ts, Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>, Readonly<{
key: PropertyKey;
parents: ReadonlyArray<Readonly<Record<PropertyKey, unknown>>>;
}>>;
export declare const Pipe: string[];
export declare const extname: (path: string) => string,
basename: (path: string, suffix?: string) => string,
relative: (from: string, to: string) => string,
dirname: (path: string) => string,
normalize: (path: string) => string,
sep: "\\" | "/";
export declare const extname: (path: string) => string, basename: (path: string, suffix?: string) => string, relative: (from: string, to: string) => string, dirname: (path: string) => string, normalize: (path: string) => string, sep: "\\" | "/";
export declare const Current: string;
1 change: 0 additions & 1 deletion Target/Function/Exec.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type Interface from "../Interface/Exec.js";

/**
* @module Exec
*
Expand Down
1 change: 0 additions & 1 deletion Target/Function/File.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type Interface from "../Interface/File.js";

/**
* @module File
*
Expand Down
1 change: 0 additions & 1 deletion Target/Function/JSON.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type Interface from "../Interface/JSON.js";

/**
* @module JSON
*
Expand Down
28 changes: 11 additions & 17 deletions Target/Function/Merge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
* @module Merge
*
*/
declare const _default: <Ts extends readonly unknown[]>(
...objects: Ts
) => import("deepmerge-ts").DeepMergeHKT<
Ts,
Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>,
Readonly<{
key: PropertyKey;
parents: ReadonlyArray<Readonly<Record<PropertyKey, unknown>>>;
}>
>;
declare const _default: <Ts extends readonly unknown[]>(...objects: Ts) => import("deepmerge-ts").DeepMergeHKT<Ts, Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>, Readonly<{
key: PropertyKey;
parents: ReadonlyArray<Readonly<Record<PropertyKey, unknown>>>;
}>>;
export default _default;
40 changes: 18 additions & 22 deletions Target/Interface/Build.d.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
import type { Pattern } from "fast-glob";

/**
* @module Build
*
*/
export default interface Interface {
/**
* Represents a function that processes file patterns.
*
* @param File - An array of file patterns to be processed. Each pattern can include wildcards (*) to match multiple files.
*
* @param Option - An optional object that can contain two properties.
*
* @param Option.ESBuild - A string representing the ESBuild option.
*
* @param Option.TypeScript - A string representing the TypeScript option.
*
*/
(
File: Pattern[],
Option?: {
ESBuild?: string;
TypeScript?: string;
Watch?: boolean;
Exclude?: Pattern[];
},
): Promise<void>;
/**
* Represents a function that processes file patterns.
*
* @param File - An array of file patterns to be processed. Each pattern can include wildcards (*) to match multiple files.
*
* @param Option - An optional object that can contain two properties.
*
* @param Option.ESBuild - A string representing the ESBuild option.
*
* @param Option.TypeScript - A string representing the TypeScript option.
*
*/
(File: Pattern[], Option?: {
ESBuild?: string;
TypeScript?: string;
Watch?: boolean;
Exclude?: Pattern[];
}): Promise<void>;
}
33 changes: 15 additions & 18 deletions Target/Interface/Exec.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
*
*/
export default interface Interface {
/**
* The 'Exec' function is an asynchronous function that executes a command and logs the
* stdout and stderr of the child process.
*
* @param 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.
*
* @param Echo - An optional parameter that controls whether the stdout and stderr
* of the child process should be logged. If set to 'false', no logging will occur. If set
* to a function, the function will be called with the stdout and stderr data as a parameter for custom
* logging. If not provided, stdout and stderr will be logged to the console by default.
*
*/
(
Command: string,
Echo?: false | ((Return: any, _Error?: boolean) => Promise<void>),
): Promise<void>;
/**
* The 'Exec' function is an asynchronous function that executes a command and logs the
* stdout and stderr of the child process.
*
* @param 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.
*
* @param Echo - An optional parameter that controls whether the stdout and stderr
* of the child process should be logged. If set to 'false', no logging will occur. If set
* to a function, the function will be called with the stdout and stderr data as a parameter for custom
* logging. If not provided, stdout and stderr will be logged to the console by default.
*
*/
(Command: string, Echo?: false | ((Return: any, _Error?: boolean) => Promise<void>)): Promise<void>;
}
28 changes: 14 additions & 14 deletions Target/Interface/File.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
*
*/
export default interface Interface {
/**
* This function asynchronously processes a file located at the given path. If the file is a TypeScript
* (.ts) file, it performs the following steps:
* 1. Converts TypeScript code to JavaScript.
* 2. Creates a JavaScript module and emits it.
* 3. Writes the transpiled JavaScript code to a new file with a .js extension.
*
* Finally, it imports and returns the default export of the processed JavaScript module.
*
* @param Path - The 'Path' parameter is a string that represents the file path of the file
* you want to process.
*
*/
(Path: string): Promise<any>;
/**
* This function asynchronously processes a file located at the given path. If the file is a TypeScript
* (.ts) file, it performs the following steps:
* 1. Converts TypeScript code to JavaScript.
* 2. Creates a JavaScript module and emits it.
* 3. Writes the transpiled JavaScript code to a new file with a .js extension.
*
* Finally, it imports and returns the default export of the processed JavaScript module.
*
* @param Path - The 'Path' parameter is a string that represents the file path of the file
* you want to process.
*
*/
(Path: string): Promise<any>;
}
28 changes: 14 additions & 14 deletions Target/Interface/JSON.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
*
*/
export default interface Interface {
/**
* The function 'JSON' is a TypeScript function that reads a JSON file and returns its
* parsed content.
*
* @param File - The `File` parameter is a string that represents the name or
* path of the JSON file that you want to parse.
*
* @param From - The `From` parameter is an optional string that represents
* the directory path from which the JSON file should be loaded. If `From` is provided,
* it will be used as the base directory path. If `From` is not provided, the current
* directory will be used as the base directory path.
*
*/
(File: string, From?: string): Promise<ReturnType<typeof JSON.parse>>;
/**
* The function 'JSON' is a TypeScript function that reads a JSON file and returns its
* parsed content.
*
* @param File - The `File` parameter is a string that represents the name or
* path of the JSON file that you want to parse.
*
* @param From - The `From` parameter is an optional string that represents
* the directory path from which the JSON file should be loaded. If `From` is provided,
* it will be used as the base directory path. If `From` is not provided, the current
* directory will be used as the base directory path.
*
*/
(File: string, From?: string): Promise<ReturnType<typeof JSON.parse>>;
}
1 change: 0 additions & 1 deletion Target/Variable/ESBuild.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { BuildOptions } from "esbuild";

/**
* @module ESBuild
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"prepublishOnly": "node --no-warnings --loader ts-node/esm Source/Class/Build.ts 'Source/**/*.ts'"
},
"dependencies": {
"@types/node": "22.7.6",
"@types/node": "22.7.7",
"commander": "12.1.0",
"deepmerge-ts": "7.1.3",
"esbuild": "0.24.0",
Expand Down

0 comments on commit 3dbbc8f

Please sign in to comment.