mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: ♻️ Rewrite build system to fit the monorepo architecture
This commit is contained in:
parent
7de4b573e3
commit
90b6399407
217 changed files with 2143 additions and 1858 deletions
19
packages/client/build.ts
Normal file
19
packages/client/build.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { $, build } from "bun";
|
||||
import manifest from "./package.json" with { type: "json" };
|
||||
|
||||
console.log("Building...");
|
||||
|
||||
await $`rm -rf dist && mkdir dist`;
|
||||
|
||||
await build({
|
||||
entrypoints: Object.values(manifest.exports).map((entry) => entry.import),
|
||||
outdir: "dist",
|
||||
target: "bun",
|
||||
splitting: true,
|
||||
minify: true,
|
||||
external: [
|
||||
...Object.keys(manifest.dependencies).filter((dep) =>
|
||||
dep.startsWith("@versia"),
|
||||
),
|
||||
],
|
||||
});
|
||||
|
|
@ -7,6 +7,9 @@
|
|||
"name": "Jesse Wierzbinski (CPlusPatch)",
|
||||
"url": "https://cpluspatch.com"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bun run build.ts"
|
||||
},
|
||||
"readme": "README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -41,12 +44,10 @@
|
|||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts",
|
||||
"default": "./index.ts"
|
||||
"import": "./index.ts"
|
||||
},
|
||||
"./schemas": {
|
||||
"import": "./schemas.ts",
|
||||
"default": "./schemas.ts"
|
||||
"import": "./schemas.ts"
|
||||
}
|
||||
},
|
||||
"funding": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue