[refactor] events (#230)

* bumps rko, adds events

* rename tlstate to state, fix env for multiplayer test

* Fix multiplayer

* rename data tldrawstate to tldrawsnapshot

* Update multiplayer-editor.tsx

* Fix shhhmp

* Update 2.tldr

* Add API to the README
This commit is contained in:
Steve Ruiz 2021-11-08 14:21:37 +00:00 committed by GitHub
parent f037118928
commit be2c6d6d1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
131 changed files with 3938 additions and 3674 deletions

View file

@ -1,6 +1,9 @@
/* eslint-disable no-undef */
import fs from 'fs'
import esbuildServe from 'esbuild-serve'
import dotenv from 'dotenv'
dotenv.config()
async function main() {
if (!fs.existsSync('./dist')) {
@ -11,6 +14,8 @@ async function main() {
if (err) throw err
})
console.log(process.env.LIVEBLOCKS_PUBLIC_API_KEY)
try {
await esbuildServe(
{
@ -20,9 +25,11 @@ async function main() {
bundle: true,
sourcemap: true,
incremental: true,
target: ['chrome58', 'firefox57', 'safari11', 'edge18'],
format: 'cjs',
target: 'es6',
define: {
'process.env.NODE_ENV': '"development"',
'process.env.LIVEBLOCKS_PUBLIC_API_KEY': `"${process.env.LIVEBLOCKS_PUBLIC_API_KEY}"`,
},
watch: {
onRebuild(err) {