Replies: 3 comments 4 replies
-
Hi @harold - I suggest using a tool like vite for this. An example: If you don't use any tooling at all, you can solve this using import-maps. Check out the source of the squint playground |
Beta Was this translation helpful? Give feedback.
-
Wild. Got it - thanks for the pointers - I imagine future searchers will also benefit from this information. 👍 |
Beta Was this translation helpful? Give feedback.
-
Yeah, that's neat - I can imagine the playground itself being done that way (maybe it already is?) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
squint/examples/threejs/playground.html
Lines 313 to 319 in 435db9c
I have stared (squinted?) at this long enough that I now believe that this part of the program could be written in 'clojurescript' and prepared with squint itself... (!)
Though, in doing, I have found some limitations in local-dev for squint programs targeting the browser.
Related: #224
A squint program located at
./src/app.cljs
, with asquint.edn
containing{:paths ["src"] ...}
has first lineimport * as squint_core from 'squint-cljs/core.js';
which is a bit tricky (though obviously not impossible) to get to resolve to./node_modules/squint-cljs/core.js
Some kind of bun/esbuild bundler awareness might be cool here - somehow getting a bundler to watch the output, produce a single js file, and line up all the paths for other installed npm modules would be sweet. I got close with ugly hacks.
I made this a discussion rather than an issue, because I think I'm going to back out here and develop the frontend I'm working on with
shadow-cljs
- though, amusingly, there I still plan to consume squint through npm to transform user-entered code into js. 🤭Thanks again for all this fun, really enjoying myself and learning A LOT.
🙇
Beta Was this translation helpful? Give feedback.
All reactions