local link of the runtime
Because the current runtime has some build issues and also because I am trying to debug something (i.e. application css overflow), I would like to be able to edit the runtime. I tried editing the runtime in node_modules but changes weren't seen (even after clearing
vite-cache
.
Yarn offers yarn patch
and yarn link
which are potential solutions. However, when I tried to git clone [email protected]:typhonjs-fvtt-lib/typhonjs.git
I got confused because it does not contain the same folders / files as in node_modules @typhonjs-fvtt/runtime
.
So the question is how do I get a local, editable copy of the runtime linked to my local module for debugging?
Specifically I want to edit and debug in @typhonjs-fvtt/runtime/_dist/svelte/component/core/application/ApplicationShell
5 Replies
Because the current runtime has some build issuesLike what?
Are you discussing the potential missing
sideEffects
entries in package.json for hot reloading of lang
files? That can be patched and is potentially a problem in that single feature, but is limited to a missing file reference in package.json
. If you changed that like I mentioned perhaps you haven't setup other Foundry configuration aspects correctly.
For the application overflow aspect that is totally working on the TRL side of things, but seemingly you don't know how to use svelte-select properly in fixed / overflow mode. I told you to look at the configuration of svelte-select.
---
The runtime repo doesn't check in the final NPM distributed files in Github. You'll also not be able to build the runtime as I have a bespoke build process that combines several other repos together. Also because the runtime is not branched you'd be attempting to build 0.2.0
which is still being completed.Ok no worries. I'll work around it.
If you changed that like I mentionedI did and that's working, so wanted to run a
yarn patch
on it to keep it in place but that requires a diff file to be generated, which is why I was looking for a local copy of the lib
I told you to look at the configuration of svelte-select.I did. Unfortunately that wasn't working so I was looking to try isolate the problem by removing the CSS applied by ApplicationShell. In the end SvelteSelect seems over-complicated for my needs and there are quite a few issues with it that I found, so I've rolled my own Select element. All good.
If you really need to work with hot reload of lang files you can patch that small
package.json
inclusion locally in your project manually. As long as you are not reinstalling dependencies running npm install
much this is fine until 0.2.0
is released. That isn't a mandatory feature and is a nice to have.
3rd party Svelte components like svelte-select
are not necessarily going to be coded to latest standards. If I recall it uses mouse events instead of pointer events. By default, for best experience and particularly mobile / tablet compatibility TRL requires components to use pointer events. If I had to guess that may be why svelte-select
seems buggy. There are SvelteApplicationOptions
to set when it's absolutely necessary to include 3rd party components that use mouse events.
Before rolling your own select component there is TJSSelect
in the standard library. Of course do what thou wilt and roll your own if you think you need to. The TRL standard library still is a work in progress and a lot will be done with it especially through the Svelte 5 transition.
The Svelte 5 transition is probably going to make working with 3rd party component libraries a bit rough as just as Foundry 3rd party packages go out of maintenance and are abandoned not every Svelte 3rd party library is going to be well maintained.Ok tx. I'll check out the
TJSSelect
👍🏻0.2.0
will definitely improve several things w/ the standard library. Plus some cool new components and one that I think would be a good option if you are still working on that system where you tried to do dynamic targeting via chat messages.
Svelte 5 though is when things will change a lot and really come together.