Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 23, 2023
1 parent f9481e6 commit 0a3a3b1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Source/Fn/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async (
File,
])
),
} satisfies Option) as Option;
} satisfies Option);

const Result = await Build(
Option?.ESBuild
Expand Down
9 changes: 4 additions & 5 deletions Source/Object/Option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { PluginBuild as Build, BuildOptions as Option } from "esbuild";
import { copy as Copy } from "esbuild-plugin-copy";
import { rm as Remove } from "fs/promises";

import _JSON from "../Fn/JSON.js";

const Out = "Target";

export default {
Expand Down Expand Up @@ -41,7 +39,8 @@ export default {
}),
],
define: {
"process.env.VERSION_PACKAGE": `'${(await _JSON("package.json"))
?.version}'`,
"process.env.VERSION_PACKAGE": `'${(
await (await import("../Fn/JSON.js")).default("package.json")
)?.version}'`,
},
} satisfies Option as Option;
} satisfies Option;
2 changes: 1 addition & 1 deletion Target/Fn/Build.js

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

17 changes: 15 additions & 2 deletions Target/Object/Option.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
import type { BuildOptions as Option } from "esbuild";
declare const _default: Option;
declare const _default: {
color: true;
format: "esm";
metafile: true;
minify: true;
outdir: string;
platform: "node";
target: string;
write: true;
logLevel: "debug";
plugins: import("esbuild").Plugin[];
define: {
"process.env.VERSION_PACKAGE": string;
};
};
export default _default;
2 changes: 1 addition & 1 deletion Target/Object/Option.js

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

0 comments on commit 0a3a3b1

Please sign in to comment.