djblue / portal

A clojure tool to navigate through your data.
https://djblue.github.io/portal/
MIT License
888 stars 82 forks source link

Question regarding js dependency for custom viewer #164

Closed maacl closed 1 year ago

maacl commented 1 year ago

What would be the best way to make a js dependency (in this case https://timeline.knightlab.com/) available to use in a custom viewer? I have it available in my project, but unsure how to load it into the portal UI.

djblue commented 1 year ago

Hi @maacl, currently there isn't an easy way to bring in js dependencies outside of manually injecting a script tag.

maacl commented 1 year ago

OK. Where should I place the files, if I want cross scripting issues?

On Fri, 6 Jan 2023, 17:38 Chris Badahdah, @.***> wrote:

Hi @maacl https://github.com/maacl, currently there isn't an easy way to bring in js dependencies outside of manually injecting a script tag.

— Reply to this email directly, view it on GitHub https://github.com/djblue/portal/issues/164#issuecomment-1373874840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAPUXCYP2GWM6EKPOYGCZ3WRBC6ZANCNFSM6AAAAAATMH5C7U . You are receiving this because you were mentioned.Message ID: @.***>

djblue commented 1 year ago

@maacl I think https://github.com/djblue/portal/commit/70ce1a2622ac4b25a029b7bb14f0053d76070064 might end up solving your problem in the next release. It will allow cljs code loaded via sci to pull js from node_modules.

maacl commented 1 year ago

That sounds great.

djblue commented 1 year ago

This issue should be resolved as of 0.37.0. Please let me know if you run into any issues.

maacl commented 1 year ago

Thanks, I will give it a try.