fix: cross platform build script

pull/6534/head
Konstantinos Kaloutas 2022-08-31 15:29:32 +03:00
parent 930a48cf69
commit 1b12486a7a
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
/* eslint-disable no-undef */
import 'zx/globals'
import fs from 'fs'
import path from 'path'
// Build with [tsup](https://tsup.egoist.sh)
await $`tsup`
@ -16,4 +17,7 @@ Object.assign(glob, {
fs.writeFileSync('dist/package.json', JSON.stringify(glob, null, 2))
await $`ln -f ${__dirname}/dist/index.js ${__dirname}/../../../src/js/tldraw-logseq.js`
const dest = path.join(__dirname, '/../../../src/js/tldraw-logseq.js')
fs.unlinkSync(dest)
fs.linkSync(path.join(__dirname, '/dist/index.js'), dest)