tldraw/apps/vscode/extension/scripts/build.js
Steve Ruiz 7c2777966f
[improvement] Multiplayer + cursors (#457)
* bump versions, improve cursors

* Spline cursors
2021-12-22 00:14:38 +00:00

37 lines
720 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-disable */
const fs = require('fs')
const esbuild = require('esbuild')
const { log: jslog } = console
async function main() {
if (fs.existsSync('./dist')) {
fs.rmSync('./dist', { recursive: true }, (e) => {
if (e) {
throw e
}
})
}
try {
esbuild.buildSync({
entryPoints: ['./src/extension.ts'],
outdir: 'dist/web',
minify: false,
bundle: true,
format: 'cjs',
target: 'es6',
define: {
'process.env.NODE_ENV': '"production"',
},
tsconfig: './tsconfig.json',
external: ['vscode'],
})
jslog(`Built package.`)
} catch (e) {
jslog(`× Build failed due to an error.`)
jslog(e)
}
}
main()