Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jul 27, 2024
1 parent f276bf7 commit fca6706
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
16 changes: 9 additions & 7 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,7 +54,9 @@ 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: 5 additions & 7 deletions Source/Function/File.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ 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 @@ -30,7 +28,9 @@ 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,9 +43,7 @@ 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: 3 additions & 1 deletion Source/Variable/ESBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ 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 fca6706

Please sign in to comment.