Merge pull request #11685 from Budibase/fix/backend_core_via_tsc
Build backend-core/tests via tsc
This commit is contained in:
commit
4095c3e1a0
|
@ -14,7 +14,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "rimraf dist/",
|
"prebuild": "rimraf dist/",
|
||||||
"prepack": "cp package.json 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",
|
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
||||||
"check:types": "tsc -p tsconfig.json --noEmit --paths null",
|
"check:types": "tsc -p tsconfig.json --noEmit --paths null",
|
||||||
"test": "bash scripts/test.sh",
|
"test": "bash scripts/test.sh",
|
||||||
|
|
|
@ -1,22 +1,4 @@
|
||||||
#!/usr/bin/node
|
#!/usr/bin/node
|
||||||
|
|
||||||
const coreBuild = require("../../../scripts/build")
|
const coreBuild = require("../../../scripts/build")
|
||||||
|
|
||||||
coreBuild("./src/plugin/index.ts", "./dist/plugins.js")
|
|
||||||
coreBuild("./src/index.ts", "./dist/index.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,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue