scittle 2023-04-02

I "download" noUiSlider with

<!-- Import noUiSlider -->
    <link rel="stylesheet" href="">
    <script src=""></script>
But when I want to require it with '["nouislider$noUiSlider" :as slider] , I get the the following error:
Could not find namespace nouislider$noUiSlider.
Any idea, why?

You don’t require it in scittle, just use the global object

Like js/noUiSlider ?

And is there any way to import dependencies from Clojurians? Is there smth like jsdelivr but for Clojurians? Because I would like to use https://github.com/oliyh/martian in my Project

that is only possible if you include the source via a src="..." script tag and you need to include them in the right namespace dependency order

So there is no jsdelivr for Clojurians?

Ok, and is there something like this planned? Or can I easily compile such a project to static JS?

I think there is a way to compile lol

yes, you could compile but this is not how scittle is used. for that approach you should just use regular CLJS or shadow-cljs

Note that you don't really need jsdeliver but you can integrate sources straight from github, like this example: https://babashka.org/scittle/tictactoe.html

> Like js/noUiSlider ? Using that, I get the error Uncaught TypeError: Cannot read properties of undefined (reading 'create')

My code is

(.create js/noUiSlider (.getElementById js/document "slider")
                           #js {:start [20 80] :connect true :range {"min" 0 "max" 100}})

This means that js/noUISlider doesn't exist

can you check in the console and type no and then see if something pops up?

Uh, no, there is nothing

By I import it...

<!-- Import noUiSlider -->
    <link rel="stylesheet" href="">
    <script src=""></script>

ok, I'll have a try...

Should work now, thanks a lot!

yeah, this worked:

<!-- Import noUiSlider -->
    <link rel="stylesheet" href="">
    <script src=""></script>