diff --git a/Source/Bin.ts b/Source/Bin.ts index f401b045..768f6343 100644 --- a/Source/Bin.ts +++ b/Source/Bin.ts @@ -1,3 +1,19 @@ #!/usr/bin/env node -import "./Index.js"; +import { Command } from "commander"; +import Build from "./Command/Build.ts"; +import _JSON from "./Library/JSON.ts"; + +try { + new Command() + .name("TypeScriptESBuild") + .version((await _JSON("../package.json", import.meta.url))?.version) + .description("Builds files") + .argument("", "Files to build") + .option("-es, --ESBuild ", "esbuild configuration file") + .option("-ts, --TypeScript ", "TypeScript configuration file") + .action(Build) + .parse(); +} catch (_Error) { + console.log(_Error); +} diff --git a/Source/Export.ts b/Source/Export.ts new file mode 100644 index 00000000..0f77b057 --- /dev/null +++ b/Source/Export.ts @@ -0,0 +1,3 @@ +export { default as Build } from "./Command/Build.ts"; +export { default as ESBuild } from "./Configuration/ESBuild.ts"; + diff --git a/Source/Index.ts b/Source/Index.ts deleted file mode 100644 index 66bfd1ca..00000000 --- a/Source/Index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Command } from "commander"; -import Build from "./Command/Build.js"; -import _JSON from "./Library/JSON.js"; - -try { - new Command() - .name("TypeScriptESBuild") - .version((await _JSON("../package.json", import.meta.url))?.version) - .description("Builds files") - .argument("", "Files to build") - .option("-es, --ESBuild ", "esbuild configuration file") - .option("-ts, --TypeScript ", "TypeScript configuration file") - .action(Build) - .parse(); -} catch (_Error) { - console.log(_Error); -} diff --git a/package.json b/package.json index f0d4dc13..6e4724d1 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,6 @@ "url": "https://nikolahristov.tech" }, "type": "module", - "main": "./Target/Index.js", - "types": "./Target/Index.d.ts", "bin": { "TypeScriptESBuild": "Target/Bin.js" },