4 ms·
The startup time is of course very low, so that's good. I think you're underselling the tool for beginners like myself - it's not just a ClojureScript REPL, it
by delegate 10y ago
The startup time is of course very low, so that's good.
I think you're underselling the tool for beginners like myself - it's not just a ClojureScript REPL, it's actually an executable which can run node.js scripts written in
clojurescript.
For example, here's the typical node http server example:
https://gist.github.com/anonymous/c14b2b57184c650d9f3ff0a9e1a84058 https://gist.github.com/anonymous/c14b2b57184c650d9f3ff0a9e1...
You can run it with lumo test.cljs
- anmonteiro90 10y agoYeah, we have access to the whole Node.js ecosystem :-) it's also possible to npm install a package and use it from Lumo. The Node require resolution algorithm just works.
- mateuszf 10y agoHow do you specify which npm packages / versions do you want to use?
- anmonteiro90 10y agoJust like you'd do in Node. Add deps to a package.json and npm install. Then just `(js/require "your-package")`
- mateuszf 10y agoThat's great. Thanks.
- cutler 10y agoConsidering it's running as a standalone script, how does it resolve its dependency on cljs.nodejs? That's a Clojurescript library, no?
- anmonteiro90 10y agoThere are a number of pre-bundled libraries in Lumo. `cljs.nodejs` is actually part of ClojureScript so it's included too.
- cutler 10y agoHow do I add Clojurescript libraries to my script? Doesn't that require a lein/boot cljs project?
- anmonteiro90 10y agoLumo, just like Planck, implements classpath emulation. You can specify colon separated paths to JARs/dirs in which Lumo will resolve requires. Take a look at `lumo -h` for all the available options.
- modularfurnitur 10y agolumo -c `boot show -c`