mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 17:25:19 +03:00
feat: Sync to OSS repo
This commit is contained in:
23
packages/auth/script/build.ts
Normal file
23
packages/auth/script/build.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Glob, $ } from 'bun';
|
||||
|
||||
import pkg from '../package.json';
|
||||
|
||||
await $`rm -rf dist`;
|
||||
const files = new Glob('./src/**/*.{ts,tsx}').scan();
|
||||
for await (const file of files) {
|
||||
await Bun.build({
|
||||
format: 'esm',
|
||||
outdir: 'dist/esm',
|
||||
external: ['*'],
|
||||
root: 'src',
|
||||
entrypoints: [file]
|
||||
});
|
||||
}
|
||||
await Bun.build({
|
||||
format: 'esm',
|
||||
outdir: 'dist/esm',
|
||||
external: [...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies)],
|
||||
root: 'src',
|
||||
entrypoints: ['./src/ui/base.tsx']
|
||||
});
|
||||
await $`tsc --outDir dist/types --declaration --emitDeclarationOnly --declarationMap`;
|
||||
Reference in New Issue
Block a user