tldraw/packages/intersect/scripts/dev.js
Christian Petersen e2814943e9
[feature] Add grids (#344)
* [feature] grids

* Shows relative grids at different zoom levels

* Update colors

* Restores vec and intersect to monorepo, changes vec.round to vec.toFixed, adds vec.snap

* Snapping in translate and transforms, fix shortcut

* fix bugs in build

* use grid size for nudge too

* update scripts

* Update grid.tsx

* Update grid.tsx

* Fixed!

* Update grid.tsx

* Fix package imports

* Update Editor.tsx

* Improve tsconfigs, imports

* Fix tiny arrow bugs, snap starting points to grid

* Update tsconfig.base.json

* Update shape-styles.ts

* Fix example tsconfig

* Fix translate type error

* Fix types, paths

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-26 15:14:10 +00:00

29 lines
626 B
JavaScript

/* eslint-disable */
const esbuild = require('esbuild')
const pkg = require('../package.json')
async function main() {
try {
await esbuild.build({
entryPoints: ['src/index.tsx'],
outfile: 'dist/index.js',
bundle: true,
minify: false,
sourcemap: true,
incremental: true,
target: ['chrome58', 'firefox57', 'safari11', 'edge18'],
define: {
'process.env.NODE_ENV': '"development"',
},
watch: {
onRebuild(err) {
err ? error('❌ Failed') : log('✅ Updated')
},
},
})
} catch (err) {
process.exit(1)
}
}
main()