Do you need to go for two step classpath specification:
$ lein classpath > cp.cljs
$ lumo -c `cat cp.txt` myscript.cljs
You can do it as one via:
$ lumo -c `lein classpath` myscript.cljs
@dotemacs sure can but you're then paying the lein startup cost
Kinda defeats the purpose of having a fast starting REPL
The huckleberry
project does that for you in non-JVM way. It is an alternative. @stbgz and I where talking about transpiring Aether but nobody has had the time so far
If I knew someone who could use intellij, I'd get them to figure out where the actual code was
I have IntelliJ installed
but I never opened it
Hi. Is there any way to require namespace dynamically? It looks like Lumo doesn't like (require ...)
not at the top of the file. I want to require all the namespaces from the specified path somehow (it's something like a folder of migration files written in CLJS).
@metametadata can you give me a concrete example of what you’re trying to achieve?
@anmonteiro Yes. Assuming there's a folder migrations/
: a.cljs, b.cljs, .... I want a function or a macro: (get-migrations "migrations/")
which would return me, say, the next vector: [migrations.a/up migrations.b/up ...]
. Here up
functions are assumed to be defined in every migration ns
@metametadata you may be able to do what you want with lumo.core/eval
hm, indeed
e.g.
(def my-ns 'clojure.set)
(lumo.core/eval `(require '~my-ns))
awesome, thanks!
plus I saw some functions to list files in lumo's bundled/ folder. Hopefully these can be combined
sure
there’s a file-seq
somewhere
right
just require that namespace if you know what you’re doing
they’re bundled with Lumo but not in the snapshot
@metametadata curious to hear what you’re using Lumo for
I’ve had a couple cool testimonials at ClojuTRE
at the moment it's about automating Kubernetes deployments from Jenkins
💥
yeah, it's much better than bash 🙂
also I used it here as a simplistic alternative to pyinvoke/makefile: https://github.com/metametadata/clj-fakes/blob/master/tasks.cljs
nice!
I love hearing about these, keep me updated
I whipped up a lumo script to automatically append pivotal IDs to git commit messages. Works like a charm 🙂
@metametadata also, I’ve been quite busy recently, but I know those __filename
and SIGINT issues are annoying
I’ll have a look at them soon
thanks! they're not blocking for me but would be nice to have
Hola! Great work on lumo! I made a toy script to try it out and works great!
I would love to run the tests for the script I wrote also
is there a way to run tests directly with lumo?
@kidpollo lumo can run clojure.test
directly
standard clojure api (`run-tests`)
ahhh not but not cljs.test/run-tests
?
cljs.user=> cljs.test/run-tests
:arrow_up:
WARNING: No such namespace: cljs.test, could not locate cljs/test.cljs, cljs/test.cljc, or JavaScript source providing "cljs.test" at line
(clojure.test/run-tests)
isnt there either
@kidpollo it is odd, did you require it with :require-macros
?
Lumo 1.7.0
ClojureScript 1.9.924
Node.js v8.4.0
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Exit: Control+D or :cljs/quit or exit
cljs.user=> (require '[cljs.test :as t])
nil
cljs.user=> (t/run-tests)
Testing cljs.user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
nil
cljs.user=>
yeah I am doing something weird
also, if it is still not working maybe some fix is coming up, Antonio has been fixing things like crazy and some work might be either in progress or coming to master
^ this should work at the REPL currently
yeah I had a couple typos
it works just fine nvm 😄
this is a game changer! thanks so much @anmonteiro
glad you enjoy it
@kidpollo how did you come to know about Lumo?
Heard about it first from @kenny since I was already experimenting with cljs node and boot apps.
also saw the clojure tre talk
ended up using Lumo
repo as inspiration for the test runner lumo -c test:src scripts/test.cljs
works fine
Hey @anmonteiro does lumo provide a way to compile scripts into binaries much like itself?
does not
Is it a feature worth exploring? I think it is 😛
there might be a way of achieving that in the future
awesome
just don’t expect it anytime soon
unless someone works on it
I won’t