Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Aug 18, 2024
1 parent 47b8e77 commit 9e34cf8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
16 changes: 7 additions & 9 deletions Source/Function/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
export default (async (...[File, Option]: Parameters<Interface>) => {
for (const _File of File) {
for (const __File of await (
await import("fast-glob")
).default(_File.replaceAll("'", "").replaceAll('"', ""))) {
for (const __File of await (await import("fast-glob")).default(
_File.replaceAll("'", "").replaceAll('"', ""),
)) {
Pipe.push(__File);
}
}
Expand All @@ -32,9 +32,9 @@ export default (async (...[File, Option]: Parameters<Interface>) => {
Configuration = Option?.ESBuild
? Merge(
Configuration,
await (
await import("@Function/File.js")
).default(Option.ESBuild),
await (await import("@Function/File.js")).default(
Option.ESBuild,
),
)
: Configuration;

Expand All @@ -54,9 +54,7 @@ export default (async (...[File, Option]: Parameters<Interface>) => {
await Context.watch();
} else {
console.log(
await (
await import("esbuild")
).analyzeMetafile(
await (await import("esbuild")).analyzeMetafile(
(await (await import("esbuild")).build(Configuration))
?.metafile ?? "",
{
Expand Down
12 changes: 7 additions & 5 deletions Source/Function/File.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default (async (...[Path]: Parameters<Interface>) => {
await import("../Function/JSON.js")
).default(
"../../tsconfig.json",
(await import("path")).dirname(
(
await import("path")
).dirname(
(await import("url")).fileURLToPath(import.meta.url),
),
)
Expand All @@ -28,9 +30,7 @@ export default (async (...[Path]: Parameters<Interface>) => {
)
.emit();

await (
await import("fs/promises")
).writeFile(
await (await import("fs/promises")).writeFile(
Path.replace(".ts", ".js"),
(await import("typescript")).default.transpile(
(
Expand All @@ -43,7 +43,9 @@ export default (async (...[Path]: Parameters<Interface>) => {

return (
await import(
(await import("url"))
(
await import("url")
)
.pathToFileURL(Path)
.toString()
.replace(".ts", ".js")
Expand Down
4 changes: 1 addition & 3 deletions Source/Variable/ESBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export default {
onStart(async () => {
try {
outdir
? await (
await import("fs/promises")
).rm(outdir, {
? await (await import("fs/promises")).rm(outdir, {
recursive: true,
})
: {};
Expand Down

0 comments on commit 9e34cf8

Please sign in to comment.