Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 14, 2023
1 parent b2e309a commit 1138145
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 41 deletions.
85 changes: 47 additions & 38 deletions Configuration/ESBuild.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
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) { }
});
},
},
(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}'`,
},
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
}'`,
},
};
4 changes: 3 additions & 1 deletion Configuration/ESBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export default {
recursive: true,
})
: {};
} catch (_Error) {}
} catch (_Error) {
console.log(_Error);
}
});
},
},
Expand Down
4 changes: 2 additions & 2 deletions Source/Function/Integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default (_Option: Option = {}): AstroIntegration => {
_Biome.applyConfiguration(Biome);
}

Paths.forEach(async (Path) => {
for (const Path of Paths) {
await (
await (
await (
Expand All @@ -74,7 +74,7 @@ export default (_Option: Option = {}): AstroIntegration => {
).By("**/*.{js,mjs,cjs,ts}")
).Not(Exclude)
).Pipe(_Action);
});
}
},
},
};
Expand Down

0 comments on commit 1138145

Please sign in to comment.