tldraw/packages/tldraw/scripts/dev.js
Steve Ruiz fb77323ef2
[feature] filesystem + readonly (#218)
* Fix escape key for menu

* Adds filesystem support, readonly mode

* Move file system events to external hook

* Adds onSignIn callback, prevent event by default
2021-11-05 14:13:14 +00:00

52 lines
1.2 KiB
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 esbuild = require('esbuild')
const name = process.env.npm_package_name || ''
async function main() {
esbuild.build({
entryPoints: ['./src/index.ts'],
outdir: 'dist/esm',
minify: false,
bundle: true,
format: 'esm',
target: 'es6',
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment',
tsconfig: './tsconfig.build.json',
external: [
'react',
'react-dom',
'tslib',
'@stitches/react',
'@radix-ui/react-alert-dialog',
'@radix-ui/react-checkbox',
'@radix-ui/react-context-menu',
'@radix-ui/react-dropdown-menu',
'@radix-ui/react-icons',
'@radix-ui/react-id',
'@radix-ui/react-radio',
'@radix-ui/react-tooltip',
'@tldraw/core',
'@tldraw/vec',
'@tldraw/intersect',
'perfect-freehand',
'rko',
'react-hotkeys-hook',
'browser-fs-access',
],
sourcemap: true,
incremental: true,
watch: {
onRebuild(error) {
if (error) {
console.log(`× ${name}: An error in prevented the rebuild.`)
return
}
console.log(`${name}: Rebuilt.`)
},
},
})
}
main()