From 45585d263ace298e895c54899f375328fc129730 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 6 Sep 2023 13:14:59 +0200 Subject: [PATCH] Build backend-core/tests via tsc --- packages/backend-core/package.json | 2 +- packages/backend-core/scripts/build.js | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 970a4aab8d..cf8d6fbe17 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -14,7 +14,7 @@ "scripts": { "prebuild": "rimraf dist/", "prepack": "cp package.json dist", - "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", + "build": "tsc -p tsconfig.build.json --paths null && node ./scripts/build.js", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null", "test": "bash scripts/test.sh", diff --git a/packages/backend-core/scripts/build.js b/packages/backend-core/scripts/build.js index b40404aade..9cc33d7b75 100644 --- a/packages/backend-core/scripts/build.js +++ b/packages/backend-core/scripts/build.js @@ -1,22 +1,4 @@ #!/usr/bin/node - const coreBuild = require("../../../scripts/build") -coreBuild("./src/plugin/index.ts", "./dist/plugins.js") coreBuild("./src/index.ts", "./dist/index.js") - -const glob = require("glob") -const inputFiles = [ - ...glob.sync("./src/**/*.[tj]s", { nodir: true }), - ...glob.sync("./tests/**/*.[tj]s", { nodir: true }), -] - -const path = require("path") -for (const file of inputFiles) { - coreBuild(file, `./${path.join("dist", file.replace(/\.ts$/, ".js"))}`, { - skipMeta: true, - bundle: false, - forcedFormat: "cjs", - silent: true, - }) -}