tldraw/scripts
Mitja Bezenšek bacb307bad
Asset improvements (#1557)
This PR does the following:
- Add `selfHosted.js`, which is a great option for users that wish to
self host the assets. Works well for both self hosting from the public
folder or via a CDN.
- Updates the docs for assets. We now have a dedicated page for assets
where all the options are more clearly explained. I also removed the
assets explanation from the main docs as the unpkg option should work
out of the box and setting up the assets is no longer necessary.
- Cleaned up the `refresh-assets` script. We now use common `types.d.ts`
file to define our types. All the other options then reuse them.
- Pulled out the `formatAssetUrl` into it's own file. It's now static an
no longer generated.
- `urls.d.ts`, `import.d.ts`, and newly added `selfhosted.d.ts` are now
also no longer generated as we can import the types from `types.d.ts`.
- You can now pass a subset of `assetUrls` to `<Tldraw />` and it will
override the default option with the passed in overrides. This makes it
easy to only customizes certain assets (only change the draw font as an
example).

### Change Type

- [x] `patch` — Bug Fix
2023-06-09 11:43:01 +00:00
..
lib Use unpkg as a default for serving assets. (#1548) 2023-06-07 21:01:38 +00:00
api-check.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +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 Revert 09c36781 & tweak linting (#1501) 2023-06-02 10:45:51 +00:00
clean.sh [chore] use explicit yarn in clean script (#1216) 2023-05-02 13:33:30 +00:00
lint.ts Revert 09c36781 & tweak linting (#1501) 2023-06-02 10:45:51 +00:00
package.json update lazyrepo 2023-06-05 18:32:32 +01:00
postpack.sh transfer-out: transfer out 2023-04-25 12:01:25 +01:00
prepack.ts avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
publish-canary.ts [infra] use npx to run auto (#1521) 2023-06-05 14:46:59 +00:00
publish-manual.ts Fix publishing (#1338) 2023-05-09 13:25:56 +00:00
publish-new.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
refresh-assets.ts Asset improvements (#1557) 2023-06-09 11:43:01 +00:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
typecheck.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00