| 1234567891011121314151617181920212223 | #!/usr/bin/env zx/* eslint-disable no-undef */import 'zx/globals'import fs from 'fs'import path from 'path'// Build with [tsup](https://tsup.egoist.sh)await $`npx tsup`// Prepare package.json fileconst packageJson = fs.readFileSync('package.json', 'utf8')const glob = JSON.parse(packageJson)Object.assign(glob, {  main: './index.js',  module: './index.mjs',})fs.writeFileSync('dist/package.json', JSON.stringify(glob, null, 2))const dest = path.join(__dirname, '/../../../src/main/frontend/tldraw-logseq.js')if (fs.existsSync(dest)) fs.unlinkSync(dest)fs.linkSync(path.join(__dirname, '/dist/index.js'), dest)
 |