Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 4, 2023
1 parent 3d90690 commit a364f61
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 35 deletions.
14 changes: 7 additions & 7 deletions Configuration/ESBuild.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
declare const _default: {
format: "esm";
minify: true;
outdir: string;
bundle: true;
platform: "browser";
target: string[];
plugins: import("esbuild").Plugin[];
format: "esm";
minify: true;
outdir: string;
bundle: true;
platform: "browser";
target: string[];
plugins: import("esbuild").Plugin[];
};
export default _default;
56 changes: 28 additions & 28 deletions Configuration/ESBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ import { copy as Copy } from "esbuild-plugin-copy";
import { rm as Remove } from "fs/promises";
const outDir = "Target";
export default {
format: "esm",
minify: true,
outdir: outDir,
bundle: true,
platform: "browser",
target: ["edge104", "esnext"],
plugins: [
{
name: "Target",
setup: (Build) =>
Build.onStart(async () => {
try {
await Remove(outDir, {
recursive: true,
});
} catch (_Error) {}
}),
},
Copy({
resolveFrom: "out",
assets: [
{
from: "./Source/styles/*.css",
to: "./styles/",
},
],
}),
],
format: "esm",
minify: true,
outdir: outDir,
bundle: true,
platform: "browser",
target: ["edge104", "esnext"],
plugins: [
{
name: "Target",
setup: (Build) => Build.onStart(async () => {
try {
await Remove(outDir, {
recursive: true,
});
}
catch (_Error) { }
}),
},
Copy({
resolveFrom: "out",
assets: [
{
from: "./Source/styles/*.css",
to: "./styles/",
},
],
}),
],
};
9 changes: 9 additions & 0 deletions Target/Library/DOM.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
interface NodeListOf<TNode extends Node> extends NodeList {
item(Index: number): TNode;
forEach(callbackfn: (value: TNode, key: number, parent: NodeListOf<TNode>) => void, thisArg?: any): void;
[index: number]: TNode;
}
declare const _default: {
getElement: (Selector: string, Parent?: HTMLElement | Document) => Promise<NodeListOf<HTMLElement>>;
};
export default _default;
1 change: 1 addition & 0 deletions Target/Library/DOM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var n={getElement:async(e,t=document)=>t.querySelectorAll(e)};export{n as default};
8 changes: 8 additions & 0 deletions Target/Script/Fa.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="node" resolution-mode="require"/>
declare global {
interface Window {
interval: NodeJS.Timer;
timeout: NodeJS.Timeout;
}
}
export {};
1 change: 1 addition & 0 deletions Target/Script/Fa.js

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

7 changes: 7 additions & 0 deletions Target/Script/Ta.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference types="node" resolution-mode="require"/>
declare global {
interface Window {
interval: NodeJS.Timer;
}
}
export {};
1 change: 1 addition & 0 deletions Target/Script/Ta.js

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

0 comments on commit a364f61

Please sign in to comment.