Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 15, 2023
1 parent 81e73c0 commit bd181d3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Configuration/ESBuild.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare const _default: BuildOptions;
export default _default;
import type { BuildOptions } from "esbuild";
42 changes: 42 additions & 0 deletions Configuration/ESBuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export default {
color: true,
format: "esm",
metafile: true,
minify: true,
outdir: "Target",
platform: "node",
target: "esnext",
write: true,
logLevel: "debug",
plugins: [
{
name: "Target",
setup({ onStart, initialOptions: { outdir } }) {
onStart(async () => {
try {
outdir
? await (await import("fs/promises")).rm(outdir, {
recursive: true,
})
: {};
}
catch (_Error) {
console.log(_Error);
}
});
},
},
(await import("esbuild-plugin-copy")).copy({
resolveFrom: "out",
assets: [
{
from: "./Source/Notation/biome.json",
to: "./Notation/",
},
],
}),
],
define: {
"process.env.VERSION_PACKAGE": `'${(await (await import("typescript-esbuild/Target/Function/JSON.js")).default("package.json"))?.version}'`,
},
};

0 comments on commit bd181d3

Please sign in to comment.