tldraw/scripts
alex 880f82e658
New vite-based examples app (#1226)
Right now this examples app looks exactly the same as our old examples
app, but there are a couple of tiny differences:
- We use `vite` instead of our own esbuild setup for development and
bundling
- We use `@tldraw/assets` for smart asset hashing instead of copying the
assets to a public folder

You can use `@tldraw/assets` with vite with a bunch of extra config, but
it (plus a bunch of other bundlers) also support a special syntax for
specifying asset urls: `new URL('./my/asset.svg',
import.meta.url).href`. This approach is more standards-complient, but
doesn't work with every bundler just yet. This diff also adds a
url-based version of `@tldraw/assets`, although I'd like to tweak the
entry point - right now you need to import from
`@tldraw/assets/lib/urls`, but i'd like to find a way to get this to
`@tldraw/assets/urls` or something at some point.

There are a couple other extra fixes in here:
- vscode builds were broken, they're fixed now!
- there's also a little tweak to the `getBundlerAssetUrls` API to allow
passing in a function instead of an object for URL formatting
- there are new internal-only functions for injecting asset urls
globally instead of passing them in via react props. this means we can
get the benefits of cacheable URLs without having to clutter our
examples by passing them in
2023-05-05 13:10:36 +00:00
..
lib New vite-based examples app (#1226) 2023-05-05 13:10:36 +00:00
api-check.ts derived presence state (#1204) 2023-04-27 18:03:19 +00:00
build-api.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
build-package.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
check-scripts.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
clean.sh [chore] use explicit yarn in clean script (#1216) 2023-05-02 13:33:30 +00:00
lint.ts lite: run prettier on js + json files 2023-05-02 16:12:34 +01:00
package.json [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
postpack.sh transfer-out: transfer out 2023-04-25 12:01:25 +01:00
prepack.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
publish-canary.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
publish-manual.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
publish-new.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
refresh-assets.ts New vite-based examples app (#1226) 2023-05-05 13:10:36 +00:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
typecheck.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00