2023-08-08 17:56:07 +02:00
|
|
|
#!/usr/bin/node
|
2023-09-05 16:44:02 +02:00
|
|
|
|
2023-08-08 17:56:07 +02:00
|
|
|
const coreBuild = require("../../../scripts/build")
|
|
|
|
|
|
|
|
coreBuild("./src/plugin/index.ts", "./dist/plugins.js")
|
|
|
|
coreBuild("./src/index.ts", "./dist/index.js")
|
2023-09-05 15:46:39 +02:00
|
|
|
|
2023-09-05 16:19:15 +02:00
|
|
|
const glob = require("glob")
|
2023-09-05 16:44:02 +02:00
|
|
|
const inputFiles = [
|
|
|
|
...glob.sync("./src/**/*.[tj]s", { nodir: true }),
|
|
|
|
...glob.sync("./tests/**/*.[tj]s", { nodir: true }),
|
|
|
|
]
|
2023-09-05 16:19:15 +02:00
|
|
|
|
2023-09-05 16:44:02 +02:00
|
|
|
const path = require("path")
|
|
|
|
for (const file of inputFiles) {
|
|
|
|
coreBuild(file, `./${path.join("dist", file.replace(/\.ts$/, ".js"))}`, {
|
|
|
|
skipMeta: true,
|
|
|
|
bundle: false,
|
|
|
|
forcedFormat: "cjs",
|
2023-09-06 01:45:59 +02:00
|
|
|
silent: true,
|
2023-09-05 16:19:15 +02:00
|
|
|
})
|
2023-09-05 16:44:02 +02:00
|
|
|
}
|