From 9154da77615771372ee82c8f6e948dbd9566d656 Mon Sep 17 00:00:00 2001 From: verytactical <186486509+verytactical@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:06:44 +0400 Subject: [PATCH] refactor: move exports from main to index --- knip.json | 8 +------- package.json | 2 +- src/index.ts | 18 ++++++++++++++++++ src/main.ts | 19 ------------------- src/verify.ts | 2 +- 5 files changed, 21 insertions(+), 28 deletions(-) delete mode 100644 src/main.ts diff --git a/knip.json b/knip.json index 34a0b0e6b..fa747e07a 100644 --- a/knip.json +++ b/knip.json @@ -1,12 +1,6 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", - "entry": [ - "src/index.ts", - "src/main.ts", - "src/node.ts", - "bin/tact.js", - "bin/unboc.js" - ], + "entry": ["src/index.ts", "src/node.ts", "bin/tact.js", "bin/unboc.js"], "project": ["src/**/*.ts", "bin/tact.js", "bin/unboc.js"], "ignore": [ "src/grammar/ast.ts", diff --git a/package.json b/package.json index 76f1f7c95..57da158c1 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "!**/test", "!/docs" ], - "main": "./dist/main.js", + "main": "./dist/index.js", "bin": { "tact": "bin/tact.js", "unboc": "bin/unboc.js" diff --git a/src/index.ts b/src/index.ts index 4ffc2787f..655155be7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,3 +16,21 @@ export { AstSorter } from "./grammar/sort"; export { AstRenamer } from "./grammar/rename"; export { AstHasher } from "./grammar/hash"; export { AstComparator } from "./grammar/compare"; + +export { + Config, + ConfigProject, + parseConfig, + verifyConfig, +} from "./config/parseConfig"; + +export { PackageFileFormat } from "./packaging/fileFormat"; + +export { VirtualFileSystem } from "./vfs/VirtualFileSystem"; + +export { createVirtualFileSystem } from "./vfs/createVirtualFileSystem"; + +export * from "./browser"; +export * from "./verify"; +export * from "./context/logger"; +export * from "./error/errors"; diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index fc936c948..000000000 --- a/src/main.ts +++ /dev/null @@ -1,19 +0,0 @@ -export { - Config, - ConfigProject, - parseConfig, - verifyConfig, -} from "./config/parseConfig"; - -export { PackageFileFormat } from "./packaging/fileFormat"; - -export { build } from "./pipeline/build"; - -export { VirtualFileSystem } from "./vfs/VirtualFileSystem"; - -export { createVirtualFileSystem } from "./vfs/createVirtualFileSystem"; - -export * from "./browser"; -export * from "./verify"; -export * from "./context/logger"; -export * from "./error/errors"; diff --git a/src/verify.ts b/src/verify.ts index 61bd86e6c..2832b7a2d 100644 --- a/src/verify.ts +++ b/src/verify.ts @@ -2,7 +2,7 @@ import normalize from "path-normalize"; import { Cell } from "@ton/core"; import { Config, Options } from "./config/parseConfig"; import { ILogger, Logger } from "./context/logger"; -import { PackageFileFormat, run } from "./main"; +import { PackageFileFormat, run } from "./"; import { fileFormat } from "./packaging/fileFormat"; import { getCompilerVersion } from "./pipeline/version";