diff --git a/packages/cli/package.json b/packages/cli/package.json index cb59bf7c69..76780acf30 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -2,16 +2,16 @@ "name": "@budibase/cli", "version": "0.0.0", "description": "Budibase CLI, for developers, self hosting and migrations.", - "main": "dist/src/index.js", + "main": "dist/index.js", "bin": { - "budi": "dist/src/index.js" + "budi": "dist/index.js" }, "author": "Budibase", "license": "GPL-3.0", "scripts": { "prebuild": "rm -rf prebuilds 2> /dev/null && cp -r ../../node_modules/leveldown/prebuilds prebuilds", "rename": "renamer --find .node --replace .fake 'prebuilds/**'", - "tsc": "tsc -p tsconfig.build.json", + "tsc": "node ../../scripts/build.js", "pkg": "pkg . --out-path build --no-bytecode --public --public-packages \"*\" -C GZip", "build": "yarn prebuild && yarn rename && yarn tsc && yarn pkg && yarn postbuild", "check:types": "tsc -p tsconfig.json --noEmit --paths null", diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index 8b2d44aec8..34a89f54c3 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -10,7 +10,12 @@ "incremental": true, "types": [ "node", "jest" ], "outDir": "dist", - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "@budibase/types": ["../types/src"], + "@budibase/backend-core": ["../backend-core/src"], + "@budibase/backend-core/*": ["../backend-core/*"] + } }, "include": [ "src/**/*" diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index c2935129a8..6ca641e214 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -5,12 +5,7 @@ "declaration": true, "sourceMap": true, "baseUrl": ".", - "resolveJsonModule": true, - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*"] - } + "resolveJsonModule": true }, "ts-node": { "require": ["tsconfig-paths/register"],