0cfc68b004
* defer cloning * basic snapping * Improves algorithm for snap points, rendering * Improves snapping, snaplines * Enables a clone to snap to its parent * Adds overlay * Fix overlay, zoom scaling for distance and speed
28 lines
558 B
JavaScript
28 lines
558 B
JavaScript
/* eslint-disable */
|
|
const fs = require('fs')
|
|
const esbuild = require('esbuild')
|
|
|
|
async function main() {
|
|
if (fs.existsSync('./dist')) {
|
|
fs.rmSync('./dist', { recursive: true }, (e) => {
|
|
if (e) {
|
|
throw e
|
|
}
|
|
})
|
|
}
|
|
|
|
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.json',
|
|
external: ['react', 'react-dom'],
|
|
})
|
|
}
|
|
|
|
main()
|