mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
add npm stuff, dist/
folder
This commit is contained in:
parent
ac3a135fff
commit
15304a80fe
22 changed files with 50951 additions and 11 deletions
22
esbuild.package.js
Normal file
22
esbuild.package.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const { dtsPlugin } = require("esbuild-plugin-d.ts");
|
||||
const { build } = require("esbuild");
|
||||
|
||||
|
||||
for (let project of ["client", "protocol"]) {
|
||||
build({
|
||||
bundle: true,
|
||||
format: "esm",
|
||||
entryPoints: [`./${project}/src/index.ts`],
|
||||
outfile: `./dist/${project}.mjs`,
|
||||
})
|
||||
build({
|
||||
bundle: true,
|
||||
format: "cjs",
|
||||
entryPoints: [`./${project}/src/index.ts`],
|
||||
outfile: `./dist/${project}.cjs`,
|
||||
plugins: [dtsPlugin({
|
||||
outDir: `./dist/${project}`,
|
||||
tsconfig: "tsconfig.json"
|
||||
})]
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue