feat(common): add blocksuite reader lib (#11955)

close CLOUD-202
This commit is contained in:
fengmk2
2025-05-14 14:52:41 +00:00
parent a1bcf77447
commit 6792c3e656
18 changed files with 2877 additions and 844 deletions

View File

@@ -0,0 +1,23 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { build } from 'esbuild';
const result = await build({
entryPoints: ['./src/index.ts'],
bundle: true,
platform: 'node',
outdir: 'dist',
target: 'es2024',
sourcemap: true,
format: 'esm',
external: ['yjs'],
metafile: true,
});
if (process.env.METAFILE) {
await fs.writeFile(
path.resolve(`metafile-${Date.now()}.json`),
JSON.stringify(result.metafile, null, 2)
);
}