1
0
Fork 0
mirror of synced 2024-08-15 01:51:33 +12:00
budibase/packages/backend-core/scripts/build.js
2023-09-05 16:44:02 +02:00

21 lines
544 B
JavaScript

#!/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",
})
}